mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 16:28:26 +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) => {
|
||||
Schema.findOne({ Guild: interaction.guild.id }, async (err, data) => {
|
||||
if (data) {
|
||||
data.Time = channel.id;
|
||||
data.TimeZone = time;
|
||||
data.save();
|
||||
}
|
||||
else {
|
||||
new Schema({
|
||||
Guild: interaction.guild.id,
|
||||
TimeZone: time,
|
||||
Time: channel.id
|
||||
}).save();
|
||||
}
|
||||
})
|
||||
new Schema({
|
||||
Guild: interaction.guild.id,
|
||||
TimeZone: time,
|
||||
Time: channel.id,
|
||||
}).save();
|
||||
|
||||
client.succNormal({
|
||||
text: `Voice channel count created!`,
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ module.exports = async (client) => {
|
|||
}
|
||||
|
||||
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",
|
||||
body: JSON.stringify({
|
||||
max_age: 86400,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue