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 /lib/automod | |
parent | 11d6fb8ecfca5c1a48fea32bf8a503eb9bb6107d (diff) | |
download | tanzanite-093c5a4182eae14aab241f769c70c490460925f1.tar.gz tanzanite-093c5a4182eae14aab241f769c70c490460925f1.tar.bz2 tanzanite-093c5a4182eae14aab241f769c70c490460925f1.zip |
fix presence automod
Diffstat (limited to 'lib/automod')
-rw-r--r-- | lib/automod/PresenceAutomod.ts | 12 |
1 files changed, 9 insertions, 3 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); |