aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-09 15:15:30 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-09 15:15:30 -0500
commit34073ca297847524bbaac854e2126d51225fbaaf (patch)
treedfa8f3011ec7b114d02fe1d7277882c972ee3d2d
parent73ebab839201aaef9d76bfb19fa22c99a76a6b79 (diff)
downloadtanzanite-34073ca297847524bbaac854e2126d51225fbaaf.tar.gz
tanzanite-34073ca297847524bbaac854e2126d51225fbaaf.tar.bz2
tanzanite-34073ca297847524bbaac854e2126d51225fbaaf.zip
fix automod
-rw-r--r--src/commands/dev/test.ts6
-rw-r--r--src/lib/common/AutoMod.ts4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts
index 50532f8..1ec7f71 100644
--- a/src/commands/dev/test.ts
+++ b/src/commands/dev/test.ts
@@ -3,6 +3,7 @@ import { MessageActionRow, MessageButton, MessageEmbed, type ApplicationCommand,
import { MessageButtonStyles } from 'discord.js/typings/enums';
import badLinksSecretArray from '../../lib/badlinks-secret.js';
import badLinksArray from '../../lib/badlinks.js';
+import badWords from '../../lib/badwords.js';
export default class TestCommand extends BushCommand {
public constructor() {
@@ -150,12 +151,13 @@ export default class TestCommand extends BushCommand {
return await message.util.reply(`${util.emojis.success} Removed guild commands and global commands.`);
} else if (['drop down', 'drop downs', 'select menu', 'select menus'].includes(args?.feature?.toLowerCase())) {
- } else if (['sync links'].includes(args?.feature?.toLowerCase())) {
+ } else if (['sync automod'].includes(args?.feature?.toLowerCase())) {
const row = (await Shared.findByPk(0))!;
row.badLinks = badLinksArray;
row.badLinksSecret = badLinksSecretArray;
+ row.badWords = badWords;
await row.save();
- return await message.util.reply(`${util.emojis.success} Updated bad links.`);
+ return await message.util.reply(`${util.emojis.success} Synced automod.`);
}
return await message.util.reply(responses[Math.floor(Math.random() * responses.length)]);
}
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts
index 4b2b072..50f5d3e 100644
--- a/src/lib/common/AutoMod.ts
+++ b/src/lib/common/AutoMod.ts
@@ -253,9 +253,7 @@ export class AutoMod {
.setDescription(
`**User:** ${this.message.author} (${this.message.author.tag})\n**Sent From**: <#${
this.message.channel.id
- }> [Jump to context](${this.message.url})\n**Blacklisted Words:** ${Object.keys(offences)
- .map((key) => `\`${key}\``)
- .join(', ')}`
+ }> [Jump to context](${this.message.url})\n**Blacklisted Words:** ${offences.map((o) => `\`${o.match}\``).join(', ')}`
)
.addField('Message Content', `${await util.codeblock(this.message.content, 1024)}`)
.setColor(color)