fix deprecation issues
This commit is contained in:
31 files changed
+586
-1933
No files matched your search
@@ -1,4 +1,4 @@
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
name: "disconnect_account",
|
||||
@@ -19,13 +19,13 @@ module.exports = {
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||
}
|
||||
let user = await client.dbo.collection("users").findOne({"user.discord.id":interaction.member.user.id}).then(user => user);
|
||||
if (!user) return interaction.send(`You cannot logout if your not logged in.`);
|
||||
if (!user) return interaction.send({ content: `You cannot logout if your not logged in.` });
|
||||
client.dbo.collection("users").updateOne({"user.discord.id":interaction.member.user.id},{$unset:{"user.discord":""}, $set:{"user.discordConnected":false}},function(err,res) {
|
||||
if (err) throw err;
|
||||
return interaction.send(`Succesfully disconnected you Discord account.`);
|
||||
return interaction.send({ content: `Succesfully disconnected you Discord account.` });
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user