Fix exception if bot mentioned without a command
This commit is contained in:
parent
f4e39a69dc
commit
6343ae50ea
|
@ -33,6 +33,9 @@ function handleMessage(client, message, commands, guildData) {
|
||||||
|
|
||||||
/**@param param*/
|
/**@param param*/
|
||||||
function handleInternalCommand(message, split, commands, isMemberAdmin) {
|
function handleInternalCommand(message, split, commands, isMemberAdmin) {
|
||||||
|
if (!split[1])
|
||||||
|
return;
|
||||||
|
|
||||||
if (split[1].toLowerCase() === "version")
|
if (split[1].toLowerCase() === "version")
|
||||||
message.reply(`${ParentPackageJSON.name} v${ParentPackageJSON.version}`);
|
message.reply(`${ParentPackageJSON.name} v${ParentPackageJSON.version}`);
|
||||||
else if (split[1].toLowerCase() === "help") {
|
else if (split[1].toLowerCase() === "help") {
|
||||||
|
|
Loading…
Reference in a new issue