From 62077831b43c2fbb766eb6d8e871a351f95410f2 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Tue, 10 May 2022 21:06:11 -0700 Subject: [PATCH] fix channel provide args --- commands/setChannel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/setChannel.js b/commands/setChannel.js index 0b5f7f0..cfc0005 100644 --- a/commands/setChannel.js +++ b/commands/setChannel.js @@ -16,7 +16,7 @@ module.exports = { * @param {string[]} args * @param {*} param3 */ - run: async (client, message) => { + run: async (client, message, args) => { if (args.length==0) return message.channel.send(`You must provide a channel.`); let channelid = args[0].replace('<#', '').replace('>', ''); let channel = client.channels.cache.get(channelid); @@ -54,7 +54,7 @@ module.exports = { let channelid = args[0].value; let channel = client.channels.cache.get(channelid); - if (!channel) return message.channel.send(`Cannot find that channel.`); + if (!channel) return interaction.send(`Cannot find that channel.`); if (channel.type=="voice") return interaction.send(`Connot set voice channel to preferred channel.`); if (channel.deleted) return interaction.send(`Connot set deleted channel to preferred channel.`); let guild = await client.dbo.collection("prefixes").findOne({"server.serverID":interaction.guild.id}).then(guild => guild);