mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 08:20:58 -05:00
Fix disabledChannels filter
This commit is contained in:
parent
ea61a47418
commit
30adcefa7f
@ -9,7 +9,7 @@ export default {
|
||||
if (msg.guild?.id != client.config.mainServer.id) return;
|
||||
if (msg.partial) 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}\``);
|
||||
if (msg.content.length != 0) embed.addFields({name: 'Content', value: `\`\`\`\n${msg.content.slice(0,1000)}\n\`\`\``});
|
||||
embed.addFields(
|
||||
|
@ -11,7 +11,7 @@ export default {
|
||||
if (oldMsg.partial) return;
|
||||
if (newMsg.partial) return;
|
||||
if (!newMsg.member) return;
|
||||
if (disabledChannels) return;
|
||||
if (disabledChannels.includes(newMsg.channelId)) return;
|
||||
const msgarr = newMsg.content.toLowerCase().split(' ');
|
||||
if (client.bannedWords._content.some((word:string)=>msgarr.includes(word)) && (!client.isStaff(newMsg.member))) newMsg.delete();
|
||||
if (newMsg.content === oldMsg.content) return;
|
||||
|
Loading…
Reference in New Issue
Block a user