Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Commit

Permalink
WOW
Browse files Browse the repository at this point in the history
IM SO STUPID
  • Loading branch information
Remco authored and Remco committed Dec 21, 2015
1 parent e8bfe62 commit 16271b3
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions discord_bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ var commands = {
usage: "<number-of-messages-to-delete>",
extendedhelp: "I'll delete a certain ammount of messages.",
process: function(bot, msg, suffix) {
if (msg.channel.isPrivate) {
if (!msg.channel.server) {
bot.sendMessage(msg.channel, "You can't do that in a DM, dummy!");
return;
}
Expand Down Expand Up @@ -327,14 +327,14 @@ var commands = {
extendedhelp: "KappaKappaKappaKappaKappaKappaKappaKappaKappaKappa",
process: function(bot, msg, suffix) {
bot.sendFile(msg.channel, "./images/kappa.png");
if (msg.channel.isPrivate){return;}
if (msg.channel.server){
var bot_permissions = msg.channel.permissionsOf(bot.user);
if (bot_permissions.hasPermission("manageMessages")) {
bot.deleteMessage(msg);
return;
} else {
bot.sendMessage(msg.channel, "*This works best when I have the permission to delete messages!*");
}
}}
}
},
"iff": {
Expand All @@ -356,14 +356,14 @@ var commands = {
}
if (imgArray.indexOf(suffix) !== -1) {
bot.sendFile(msg.channel, "./images/" + suffix);
if (msg.channel.isPrivate){return;}
if (msg.channel.server){
var bot_permissions = msg.channel.permissionsOf(bot.user);
if (bot_permissions.hasPermission("manageMessages")) {
bot.deleteMessage(msg);
return;
} else {
bot.sendMessage(msg.channel, "*This works best when I have the permission to delete messages!*");
}
}}
} else {
bot.sendMessage(msg.channel, "*Invalid input!*");
}
Expand Down Expand Up @@ -441,14 +441,14 @@ var commands = {
// bot.sendMessage(msg.channel, suffix, true + "-" + msg.author);
// This line makes no sense... it appears there is an attempt to add "-"+msg.author to the suffix, and true is supposed to enable the boolean /tts function. This command is useless if it adds the msg.author, so I'll just fix tts for now now lol
bot.sendMessage(msg.channel, suffix);
if (msg.channel.isPrivate){return;}
if (msg.channel.server){
var bot_permissions = msg.channel.permissionsOf(bot.user);
if (bot_permissions.hasPermission("manageMessages")) {
bot.deleteMessage(msg);
return;
} else {
bot.sendMessage(msg.channel, "*This works best when I have the permission to delete messages!*");
}
}}
} else {
bot.sendMessage(msg.channel, "HEY " + msg.sender + " STOP THAT!", {tts:"true"});
}
Expand All @@ -462,14 +462,14 @@ var commands = {
process: function(bot, msg, suffix) {
if (suffix.search("!say") === -1) {
bot.sendMessage(msg.channel, suffix, {tts:"true"});
if (msg.channel.isPrivate){return;}
if (msg.channel.server){
var bot_permissions = msg.channel.permissionsOf(bot.user);
if (bot_permissions.hasPermission("manageMessages")) {
bot.deleteMessage(msg);
return;
} else {
bot.sendMessage(msg.channel, "*This works best when I have the permission to delete messages!*");
}
}}
} else {
bot.sendMessage(msg.channel, "HEY " + msg.sender + " STOP THAT!", {tts:"true"});
}
Expand All @@ -484,14 +484,14 @@ var commands = {
if (suffix.search("!say") === -1) {
var d = new Date();
bot.sendMessage(msg.channel,'"' + suffix + '"' + ' -' + msg.author + ' ' + d.getFullYear(), {tts:"true"});
if (msg.channel.isPrivate){return;}
if (msg.channel.server){
var bot_permissions = msg.channel.permissionsOf(bot.user);
if (bot_permissions.hasPermission("manageMessages")) {
bot.deleteMessage(msg);
return;
} else {
bot.sendMessage(msg.channel, "*This works best when I have the permission to delete messages!*");
}
}}
} else {
bot.sendMessage(msg.channel, "HEY " + msg.sender + " STOP THAT!", {tts:"true"});
}
Expand Down Expand Up @@ -600,14 +600,14 @@ var commands = {
imgflipper.generateMeme(meme[memetype], tags[1] ? tags[1] : "", tags[3] ? tags[3] : "", function(err, image) {
//CmdErrorLog.log("debug", arguments);
bot.sendMessage(msg.channel, image);
if (msg.channel.isPrivate){return;}
if (msg.channel.server){
var bot_permissions = msg.channel.permissionsOf(bot.user);
if (bot_permissions.hasPermission("manageMessages")) {
bot.deleteMessage(msg);
return;
} else {
bot.sendMessage(msg.channel, "*This works best when I have the permission to delete messages!*");
}
}}
});
}
},
Expand Down

0 comments on commit 16271b3

Please sign in to comment.