more bad dalton coding fixes
This commit is contained in:
12
bot.js
12
bot.js
@@ -485,11 +485,12 @@ client.on('message', message => {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'summon':
|
case 'summon':
|
||||||
|
try {
|
||||||
// Dalton's image summon command.
|
// Dalton's image summon command.
|
||||||
// Checks for banned author's using a hard coded list of discord ids.
|
// Checks for banned author's using a hard coded list of discord ids.
|
||||||
// Also rudely cleans garbage entries.
|
// Also rudely cleans garbage entries.
|
||||||
let bannedAuthors = ['143999140878090240'];
|
let banned_authors = ['143999140878090240'];
|
||||||
if (bannedAuthors.contains(message.author)) {
|
if (banned_authors.includes(message.author)) {
|
||||||
|
|
||||||
let messageSplit = message.content.substring(2).split(' ');
|
let messageSplit = message.content.substring(2).split(' ');
|
||||||
if (messageSplit.length >= 2) {
|
if (messageSplit.length >= 2) {
|
||||||
@@ -505,7 +506,7 @@ client.on('message', message => {
|
|||||||
message.channel.send(redditResponse);
|
message.channel.send(redditResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Missing Argument
|
// Missing Argumentg
|
||||||
} else {
|
} else {
|
||||||
message.reply("wut do i summon?");
|
message.reply("wut do i summon?");
|
||||||
}
|
}
|
||||||
@@ -513,6 +514,11 @@ client.on('message', message => {
|
|||||||
} else {
|
} else {
|
||||||
message.reply("You're a bad boi and a banned author, you can't summon til you learn to behave.")
|
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;
|
break;
|
||||||
|
|
||||||
// Voice commands
|
// Voice commands
|
||||||
|
Reference in New Issue
Block a user