fix(bot-discord): fix shit

yea
This commit is contained in:
GramingFoxTeam
2023-08-13 19:32:53 +03:00
parent 3ed2491b4d
commit 8b9392d97a
11 changed files with 41 additions and 33 deletions

View File

@@ -10,7 +10,7 @@ export default {
if (!msg.reference) return msg.reply('You did not reply to anyone!');
const referencedMsg = await msg.channel.messages.fetch(msg.reference.messageId);
let message = referencedMsg.content;
if (args[0]) {
if (args && args[0]) {
if (isNaN(args[0])) return msg.reply('The argument you entered is not a number!');
const msgsByAuthor = (await msg.channels.fetch({ limit: 50 })).filter(
@@ -19,8 +19,9 @@ export default {
message = msgsByAuthor.slice(Number(`-${args[0]}`));
}
await muteMember(config, referencedMsg.author, {
supportMute: true
await muteMember(config, referencedMsg.member, {
supportMute: true,
guild: msg.guild
});
exileMemberToChannel(referencedMsg.author, msg.channel, message, config, false);