Fix accidental message checking not being case-insensitive

master
Miikka 2018-02-20 12:57:34 +02:00 committed by GitHub
parent 1fa4975e18
commit bd33606384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ bot.on('messageCreate', async msg => {
// New thread // New thread
if (! thread) { if (! thread) {
// Ignore messages that shouldn't usually open new threads, such as "ok", "thanks", etc. // Ignore messages that shouldn't usually open new threads, such as "ok", "thanks", etc.
if (config.ignoreAccidentalThreads && msg.content && ACCIDENTAL_THREAD_MESSAGES.includes(msg.content.trim())) return; if (config.ignoreAccidentalThreads && msg.content && ACCIDENTAL_THREAD_MESSAGES.includes(msg.content.trim().toLowerCase())) return;
thread = await threads.createNewThreadForUser(msg.author); thread = await threads.createNewThreadForUser(msg.author);
} }