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 io = require('socket.io-client');
|
||||
|
||||
module.exports = {
|
||||
@@ -28,11 +28,11 @@ 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) return interaction.send({ content: `You are not logged in.` });
|
||||
let myReq = {
|
||||
userID: user._id,
|
||||
communityCode: args[0].value
|
||||
@@ -42,9 +42,9 @@ module.exports = {
|
||||
socket.on('bot_joined_community', (data) => {
|
||||
socket.disconnect()
|
||||
if (data.error) {
|
||||
return interaction.send(`${data.error}`);
|
||||
return interaction.send({ content: `${data.error}` });
|
||||
}
|
||||
return interaction.send(`Successfully joined the community \` ${data.commName} \``)
|
||||
return interaction.send({ content: `Successfully joined the community \` ${data.commName} \`` })
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user