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 = {
|
||||
@@ -34,15 +34,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 useCommand = await client.verifyUseCommand(GuildDB.serverID, interaction.member.roles, true);
|
||||
if (!useCommand) return interaction.send("You don't have permission to use this command");
|
||||
if (!useCommand) return interaction.send({ content: "You don't have permission to use this command" });
|
||||
|
||||
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 <@${interactoin.member.user.id}>`);
|
||||
if (user.user.activeCommunity==null) return interaction.send(`You must join a community to use this command.`);
|
||||
if (!user) return interaction.send({ content: `You are not logged in <@${interactoin.member.user.id}>` });
|
||||
if (user.user.activeCommunity==null) return interaction.send({ content: `You must join a community to use this command.` });
|
||||
let onDuty=null;
|
||||
let updateDuty=false;
|
||||
let status = args[0].value;
|
||||
@@ -66,7 +66,7 @@ module.exports = {
|
||||
const socket = io.connect(client.config.socket);
|
||||
socket.emit('bot_update_status', req);
|
||||
socket.on('bot_updated_status', (res) => {
|
||||
interaction.send(`Succesfully updated <@${interaction.member.user.id}>'s status to \`${args[0].value}\``);
|
||||
interaction.send({ content: `Succesfully updated <@${interaction.member.user.id}>'s status to \`${args[0].value}\`` });
|
||||
socket.disconnect();
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user