1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 00:10:58 -05:00

Fix disabledChannels filter

This commit is contained in:
toast-ts 2022-12-30 21:38:49 -08:00
parent 1f628e8e92
commit b208e0ed22
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ export default {
if (msg.guild?.id != client.config.mainServer.id) return; if (msg.guild?.id != client.config.mainServer.id) return;
if (msg.partial) return; if (msg.partial) return;
if (msg.author.bot) return; if (msg.author.bot) return;
if (disabledChannels) return; if (disabledChannels.includes(msg.channelId)) return;
const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setAuthor({name: `Author: ${msg.author.tag} (${msg.author.id})`, iconURL: `${msg.author.displayAvatarURL()}`}).setTitle('Message deleted').setDescription(`<@${msg.author.id}>\n\`${msg.author.id}\``); const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setAuthor({name: `Author: ${msg.author.tag} (${msg.author.id})`, iconURL: `${msg.author.displayAvatarURL()}`}).setTitle('Message deleted').setDescription(`<@${msg.author.id}>\n\`${msg.author.id}\``);
if (msg.content.length != 0) embed.addFields({name: 'Content', value: `\`\`\`\n${msg.content.slice(0,1000)}\n\`\`\``}); if (msg.content.length != 0) embed.addFields({name: 'Content', value: `\`\`\`\n${msg.content.slice(0,1000)}\n\`\`\``});
embed.addFields( embed.addFields(

View File

@ -11,7 +11,7 @@ export default {
if (oldMsg.partial) return; if (oldMsg.partial) return;
if (newMsg.partial) return; if (newMsg.partial) return;
if (!newMsg.member) return; if (!newMsg.member) return;
if (disabledChannels) return; if (disabledChannels.includes(newMsg.channelId)) return;
const msgarr = newMsg.content.toLowerCase().split(' '); const msgarr = newMsg.content.toLowerCase().split(' ');
if (client.bannedWords._content.some((word:string)=>msgarr.includes(word)) && (!client.isStaff(newMsg.member))) newMsg.delete(); if (client.bannedWords._content.some((word:string)=>msgarr.includes(word)) && (!client.isStaff(newMsg.member))) newMsg.delete();
if (newMsg.content === oldMsg.content) return; if (newMsg.content === oldMsg.content) return;