From b2c6cad5600d7ae1afc428977d392188ada97f84 Mon Sep 17 00:00:00 2001 From: TheCrazyInsanity <39921530+TheCrazyInsanity@users.noreply.github.com> Date: Sun, 19 Nov 2023 21:39:47 -0500 Subject: [PATCH] Fix i forgot to apply should fix crash when muted --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a4b0d69..23eeb54 100644 --- a/index.js +++ b/index.js @@ -108,7 +108,7 @@ const newmsg = function(isserver, guildid, channelid, content){ ognum = fs.readFileSync(`./bin/servers/${guildid}/ognum.txt`) curnum = fs.readFileSync(`./bin/servers/${guildid}/curnum.txt`) if(curnum >= ognum){ - if(client.guilds.cache.get(guildid).members.cache.get(client.user.id).permissionsIn(channelid, "SEND_MESSAGES")){ + if(client.guilds.cache.get(guildid).members.cache.get(client.user.id).permissionsIn(channelid).has("SEND_MESSAGES")){ client.guilds.cache.get(guildid).channels.cache.get(channelid).sendTyping() markovgen(true, guildid).then((result)=>{ if(result==""||result==" "){ @@ -221,4 +221,4 @@ client.on('messageCreate', (msg) =>{ }) // Login to Discord with your client's token -client.login(token); \ No newline at end of file +client.login(token);