diff options
-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 })` - ); + ); */ } } |