From 093c5a4182eae14aab241f769c70c490460925f1 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 21 Aug 2022 14:55:41 -0400 Subject: fix presence automod --- lib/automod/PresenceAutomod.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib') 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); -- cgit