mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
Fix disabledChannels filter
This commit is contained in:
parent
7da964a1f0
commit
462cf8b320
@ -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(
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user