Merge pull request #20 from jondeaves/VEN17

fix: message cast lowercase to try equal command prefix (also lowercase)
This commit is contained in:
Lance Krasniqi
2020-08-14 21:39:22 +02:00
committed by GitHub

View File

@@ -44,7 +44,7 @@ export default class App {
const prefix = this._configService.get('BOT_TRIGGER');
// If the message either doesn't start with the prefix or was sent by a bot, exit early.
if (!message.content.startsWith(prefix) || message.author.bot) return;
if (!message.content.toLowerCase().startsWith(prefix.toLowerCase()) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);
const commandName = args.shift().toLowerCase();