fix deprecation issues

This commit is contained in:
SowinskiBraeden committed 2022-09-30 10:52:40 -07:00
1 parent 4b0d89899a
commit a1cc29c43c
31 files changed
+586 -1933

No files matched your search

+4 -4
View File
@@ -1,4 +1,4 @@
const { MessageEmbed } = require('discord.js');
const { EmbedBuilder } = require('discord.js');
module.exports = {
name: "setprefix",
@@ -27,12 +27,12 @@ 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.` });
}
if (args[0].length<1) return interaction.send('Your new prefix must be \`1\` character!')
if (args[0].length<1) return interaction.send({ content: 'Your new prefix must be \`1\` character!' })
client.dbo.collection("prefixes").updateOne({"server.serverID":GuildDB.serverID},{$set:{"server.prefix":args[0].value}},function(err, res) {
if (err) throw err;
interaction.send(`The new prefix is now **\`${args[0].value}\`**`);
interaction.send({ content: `The new prefix is now **\`${args[0].value}\`**` });
});
},
},