Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit 2460e85ab8ad794af6e024ce26d084c90dc7e0d2
parent 1f5e96f01e653e7a552b2e9dddf321e428a0fd36
Author: Demonstrandum <moi@knutsen.co>
Date:   Thu, 21 May 2020 22:32:47 +0100

Fix very dumb regex mistake.

Diffstat:
Mlib/commands/choose.ts | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/commands/choose.ts b/lib/commands/choose.ts @@ -1,7 +1,7 @@ export default (home_scope: HomeScope) => { const { message, args } = home_scope; const a = args.length - ? args.join(' ').split(/\s*(?:,|or)\s*/) - : ['I need a list.']; + ? args.join(' ').split(/\s*(?:,|\bor\b)\s*/gi) + : [ 'I need a list.' ]; message.answer(a[Math.floor(Math.random() * a.length)]); };