more bad dalton coding fixes

This commit is contained in:
Dalton
2018-12-06 22:50:22 -08:00
parent f4d0c422a6
commit fd36596b71

12
bot.js
View File

@@ -485,11 +485,12 @@ client.on('message', message => {
break;
case 'summon':
try {
// Dalton's image summon command.
// Checks for banned author's using a hard coded list of discord ids.
// Also rudely cleans garbage entries.
let bannedAuthors = ['143999140878090240'];
if (bannedAuthors.contains(message.author)) {
let banned_authors = ['143999140878090240'];
if (banned_authors.includes(message.author)) {
let messageSplit = message.content.substring(2).split(' ');
if (messageSplit.length >= 2) {
@@ -505,7 +506,7 @@ client.on('message', message => {
message.channel.send(redditResponse);
}
// Missing Argument
// Missing Argumentg
} else {
message.reply("wut do i summon?");
}
@@ -513,6 +514,11 @@ client.on('message', message => {
} else {
message.reply("You're a bad boi and a banned author, you can't summon til you learn to behave.")
}
} catch (error) {
message.channel.send(error.stack);
message.channel.send(error.name);
message.channel.send(error.message);
}
break;
// Voice commands