diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-21 14:55:41 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-21 14:55:41 -0400 |
commit | 093c5a4182eae14aab241f769c70c490460925f1 (patch) | |
tree | 1f607dcaaf4fc5dd039416eeda78cadc3ac98219 | |
parent | 11d6fb8ecfca5c1a48fea32bf8a503eb9bb6107d (diff) | |
download | tanzanite-093c5a4182eae14aab241f769c70c490460925f1.tar.gz tanzanite-093c5a4182eae14aab241f769c70c490460925f1.tar.bz2 tanzanite-093c5a4182eae14aab241f769c70c490460925f1.zip |
fix presence automod
-rw-r--r-- | lib/automod/PresenceAutomod.ts | 12 | ||||
-rw-r--r-- | src/listeners/automod/presenceAutomod.ts | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/lib/automod/PresenceAutomod.ts b/lib/automod/PresenceAutomod.ts index 70c66d6..b2e879d 100644 --- a/lib/automod/PresenceAutomod.ts +++ b/lib/automod/PresenceAutomod.ts @@ -27,9 +27,15 @@ export class PresenceAutomod extends Automod { const strings = []; for (const activity of this.presence.activities) { - const str = `${activity.name}${activity.details ? `\n${activity.details}` : ''}${ - activity.buttons.length > 0 ? `\n${activity.buttons.join('\n')}` : '' - }`; + const strs = [activity.name]; + + if (activity.emoji) strs.push(activity.emoji.toString()); + if (activity.state) strs.push(activity.state); + if (activity.details) strs.push(activity.details); + if (activity.buttons.length > 0) strs.push(activity.buttons.join('\n')); + + const str = strs.join('\n'); + const check = this.checkWords(phrases, str); if (check.length > 0) { result.push(...check); diff --git a/src/listeners/automod/presenceAutomod.ts b/src/listeners/automod/presenceAutomod.ts index 07081af..eb536bf 100644 --- a/src/listeners/automod/presenceAutomod.ts +++ b/src/listeners/automod/presenceAutomod.ts @@ -1,5 +1,4 @@ import { BushClientEvents, BushListener, PresenceAutomod } from '#lib'; -import chalk from 'chalk'; export default class PresenceAutomodListener extends BushListener { public constructor() { @@ -18,10 +17,10 @@ export default class PresenceAutomodListener extends BushListener { if (!(await newPresence.guild.hasFeature('automod'))) return; new PresenceAutomod(newPresence); - console.log( + /* console.log( `${chalk.hex('#ffe605')('[PresenceAutomod]')} Created a new PresenceAutomod for ${newPresence.member.user.tag} (${ newPresence.member.user.id })` - ); + ); */ } } |