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');
|
||||
const ObjectId = require('mongodb').ObjectId;
|
||||
|
||||
module.exports = {
|
||||
@@ -20,15 +20,15 @@ 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 are not logged in.`);
|
||||
if (user.user.activeCommunity==null) return interaction.send(`You are not in a community.`);
|
||||
if (!user) return interaction.send({ content: `You are not logged in.` });
|
||||
if (user.user.activeCommunity==null) return interaction.send({ content: `You are not in a community.` });
|
||||
let community = await client.dbo.collection("communities").findOne({_id:ObjectId(user.user.activeCommunity)}).then(community => community);
|
||||
if (!community) return interaction.send(`Community not found.`);
|
||||
return interaction.send(`You are in the community \`${community.community.name}\``);
|
||||
if (!community) return interaction.send({ content: `Community not found.` });
|
||||
return interaction.send({ content: `You are in the community \`${community.community.name}\`` });
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user