modmailbot icon indicating copy to clipboard operation
modmailbot copied to clipboard

Blank (anonymous) snippet causes bot to crash.

Open kyle-wordpress opened this issue 3 years ago • 2 comments

Hello there. I believe to have found an unreported bug. Prefix is =

If you leave a snippet blank, then the bot will crash. Prefixes I am using (if this affects anything): snippetPrefixAnon = =l snippetPrefix = =lr

Other settings that may be conflicting: alwaysReply = on alwaysReplyAnon = on dbType = mysql

More settings available upon request.

As you can see by the screenshot I am using the 'hello' snippet. I ran the snippet anonymously (=lhello) and normally (=lrhello), both working fine. As soon as I put the command blank (=lr) then the bot crashes. You can see me attempt to run the same command again with no success.

image

This is the exact error message: Error: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) at Client. (/home/runner/########/src/modules/snippets.js:63:32) at processTicksAndRejections (internal/process/task_queues.js:97:5)

Thank you.

kyle-wordpress avatar Nov 23 '21 19:11 kyle-wordpress

Note: Type of database does not affect it. I tried it with a modmail bot with the same settings but the database was SQLite.

kyle-wordpress avatar Nov 23 '21 19:11 kyle-wordpress

No config needed, just tried it with !! and !!! on their own with the same error. Error: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) at Client. (/home/runner/#######/src/modules/snippets.js:63:32) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5)

kyle-wordpress avatar Nov 30 '21 08:11 kyle-wordpress