mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 20:55:16 +00:00
Allow multiple time stats
This commit is contained in:
parent
55d0670da5
commit
c347689ea3
2 changed files with 6 additions and 15 deletions
|
|
@ -27,20 +27,11 @@ module.exports = async (client, interaction, args) => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}).then(async (channel) => {
|
}).then(async (channel) => {
|
||||||
Schema.findOne({ Guild: interaction.guild.id }, async (err, data) => {
|
new Schema({
|
||||||
if (data) {
|
Guild: interaction.guild.id,
|
||||||
data.Time = channel.id;
|
TimeZone: time,
|
||||||
data.TimeZone = time;
|
Time: channel.id,
|
||||||
data.save();
|
}).save();
|
||||||
}
|
|
||||||
else {
|
|
||||||
new Schema({
|
|
||||||
Guild: interaction.guild.id,
|
|
||||||
TimeZone: time,
|
|
||||||
Time: channel.id
|
|
||||||
}).save();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
client.succNormal({
|
client.succNormal({
|
||||||
text: `Voice channel count created!`,
|
text: `Voice channel count created!`,
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ module.exports = async (client) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
client.generateActivity = function (id, name, channel, interaction) {
|
client.generateActivity = function (id, name, channel, interaction) {
|
||||||
fetch(`https://discord.com/api/v8/channels/${channel.id}/invites`, {
|
fetch(`https://discord.com/api/v10/channels/${channel.id}/invites`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
max_age: 86400,
|
max_age: 86400,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue