Skip to content
This repository was archived by the owner on Nov 19, 2017. It is now read-only.

Commit a23bd6e

Browse files
BlackMixiCrawl
authored andcommitted
fix toLowerCase undefined (#82)
If ppl change prefix return: Cannot read property 'toLowerCase' of undefined So I fixed it with this changes.
1 parent d1d7dcb commit a23bd6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Commando.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ client.on('error', winston.error)
5252
.on('unknownCommand', msg => {
5353
if (msg.channel.type === 'dm') return;
5454
if (msg.author.bot) return;
55-
56-
const args = { name: msg.content.split(client.commandPrefix)[1].toLowerCase() };
55+
if (msg.content.split(msg.guild.commandPrefix)[1] === 'undefined') return;
56+
const args = { name: msg.content.split(msg.guild.commandPrefix)[1].toLowerCase() };
5757
client.registry.resolveCommand('tags:tag').run(msg, args);
5858
})
5959
.on('message', async message => {

0 commit comments

Comments
 (0)