Allow multiple time stats

This commit is contained in:
CorwinDev 2023-01-03 19:25:19 +01:00
parent 55d0670da5
commit c347689ea3
2 changed files with 6 additions and 15 deletions

View file

@ -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!`,

View file

@ -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,