From 3b0306b0f09d79426c117784092701e1a4d8133c Mon Sep 17 00:00:00 2001 From: destruc7i0n Date: Mon, 3 Jan 2022 16:08:32 -0500 Subject: added tests --- src/Discord.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/Discord.ts') diff --git a/src/Discord.ts b/src/Discord.ts index 1245145..110ce64 100644 --- a/src/Discord.ts +++ b/src/Discord.ts @@ -190,17 +190,15 @@ class Discord { } } } - - if (['here', 'everyone'].includes(username)) { - // remove these large pings - if (!this.config.ALLOW_HERE_EVERYONE_MENTIONS) { - message = message - .replace('@everyone', '@ everyone') - .replace('@here', '@ here') - } - } } } + + if (!this.config.ALLOW_HERE_EVERYONE_MENTIONS) { + message = message + .replace('@everyone', '@ everyone') + .replace('@here', '@ here') + } + return message } -- cgit 1.4.1