diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-17 14:05:20 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-17 14:05:20 -0400 |
commit | 2d9a7025b776f2694b926f79e81d9b5ac80a8104 (patch) | |
tree | a3fe4eab791eefc10e733ec1020b97dfa5f45484 /src | |
parent | 71b0d425927efbdb154d343f2da463e884e8a74e (diff) | |
download | tanzanite-2d9a7025b776f2694b926f79e81d9b5ac80a8104.tar.gz tanzanite-2d9a7025b776f2694b926f79e81d9b5ac80a8104.tar.bz2 tanzanite-2d9a7025b776f2694b926f79e81d9b5ac80a8104.zip |
add channel to automod
Diffstat (limited to 'src')
-rw-r--r-- | src/listeners/message/automodCreate.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/listeners/message/automodCreate.ts b/src/listeners/message/automodCreate.ts index cd22a16..3f1780f 100644 --- a/src/listeners/message/automodCreate.ts +++ b/src/listeners/message/automodCreate.ts @@ -19,6 +19,7 @@ export default class AutomodMessageCreateListener extends BushListener { } public static async automod(message: BushMessage): Promise<unknown> { + if (message.channel.type === 'DM') return; if (message.guild?.id !== client.consts.mappings.guilds.bush) return; // just temporary /* await message.guild.getSetting('autoModPhases'); */ const badLinks: { [key: string]: number } = {}; @@ -82,7 +83,7 @@ export default class AutomodMessageCreateListener extends BushListener { void client.console.info( 'AutoMod', - `Severity <<${highestOffence}>> action performed on <<${message.author.tag}>> (<<${message.author.id}>>) in <<${message.guild.name}>>` + `Severity <<${highestOffence}>> action performed on <<${message.author.tag}>> (<<${message.author.id}>>) in <<#${message.channel.name}>> in <<${message.guild.name}>>` ); const color = @@ -98,9 +99,9 @@ export default class AutomodMessageCreateListener extends BushListener { new MessageEmbed() .setTitle(`[Severity ${highestOffence}] Automod Action Performed`) .setDescription( - `**User:** ${message.author} (${message.author.tag})\n**Blacklisted Words:** ${util - .surroundArray(Object.keys(offences), '`') - .join()}` + `**User:** ${message.author} (${message.author.tag})\n**Sent From**: <#${message.channel.id}> [Jump to context](${ + message.url + })\n**Blacklisted Words:** ${util.surroundArray(Object.keys(offences), '`').join()}` ) .addField('Message Content', `${await util.codeblock(message.content, 1024)}`) .setColor(color) |