Added animemes command, added nsfw pokemon command, grouped commands and help commands together

This commit is contained in:
2018-07-18 01:37:24 -05:00
parent 15dd9a85a5
commit 3c55462530

14
bot.js
View File

@@ -12,8 +12,8 @@ var channel = null;
// available commands // available commands
function availableCommands() { function availableCommands() {
var commands = "Available commands: " + var commands = "Available commands: " +
"\n**[SFW]** b.<*coinflip, 8ball, compute, bunny, dankmemes, meirl, moe, moe-boys, hotguys , kgirls, kboys*>" + "\n**[SFW]** b.<*coinflip, 8ball, compute, bunny, dankmemes, meirl, animemes, moe, moe-boys, hotguys , kgirls, kboys*>" +
"\n**[NSFW]** b.<*lewd, ecchi, hentai, yaoi, yuri, neko, hgifs*>" + "\n**[NSFW]** b.<*lewd, ecchi, hentai, yaoi, yuri, neko, pokeporn, hgifs*>" +
"\nFor more information on a command, you may use: *b.help <command>*"; "\nFor more information on a command, you may use: *b.help <command>*";
return commands; return commands;
@@ -27,6 +27,7 @@ function commandsHelp(requestedCommand) {
"bunny": "**bunny:** Posts a picture from imgur on r/rabbits", "bunny": "**bunny:** Posts a picture from imgur on r/rabbits",
"dankmemes": "**dankmemes:** Posts a picture from reddit/imgur on r/dankmemes", "dankmemes": "**dankmemes:** Posts a picture from reddit/imgur on r/dankmemes",
"meirl": "**meirl:** Posts a picture from reddit/imgur on r/anime_irl", "meirl": "**meirl:** Posts a picture from reddit/imgur on r/anime_irl",
"animemes": "**animemes:** Posts a picture from reddit/imgur on r/animemes",
"moe": "**moe:** Posts a picture from redditbooru/imgur on r/awwnime", "moe": "**moe:** Posts a picture from redditbooru/imgur on r/awwnime",
"moe-boys": "**moe-boys:** Posts a picture from reddit/imgur on r/cuteanimeboys", "moe-boys": "**moe-boys:** Posts a picture from reddit/imgur on r/cuteanimeboys",
"hotguys": "**hotguys:** Posts a picture from redditbooru/reddit on r/bishounen", "hotguys": "**hotguys:** Posts a picture from redditbooru/reddit on r/bishounen",
@@ -38,6 +39,7 @@ function commandsHelp(requestedCommand) {
"yaoi": "[NSFW] **yaoi:** Posts a picture from imgur on r/yaoi", "yaoi": "[NSFW] **yaoi:** Posts a picture from imgur on r/yaoi",
"yuru": "[NSFW] **yuri:** Post a picture from imgur on r/yuri", "yuru": "[NSFW] **yuri:** Post a picture from imgur on r/yuri",
"neko": "[NSFW] **neko:** Posts a picture from reddit/imgur on r/nekomimi", "neko": "[NSFW] **neko:** Posts a picture from reddit/imgur on r/nekomimi",
"pokeporn": "[NSFW] **pokeporn:** Posts a picture from redditbooru/reddit on r/pokeporn",
"hgifs": "[NSFW] **hgifs:** Posts a gif from reddit on r/nsfwanimegifs"}; "hgifs": "[NSFW] **hgifs:** Posts a gif from reddit on r/nsfwanimegifs"};
if (commands[requestedCommand] === undefined) if (commands[requestedCommand] === undefined)
{ {
@@ -284,8 +286,6 @@ client.on('message', message => {
// Reply commands // Reply commands
case 'command': case 'command':
case 'commands': case 'commands':
message.channel.send(availableCommands());
break;
case 'help': case 'help':
var message_content = message.content.substring(2).split(' '); var message_content = message.content.substring(2).split(' ');
if(message_content[1] === undefined) if(message_content[1] === undefined)
@@ -353,6 +353,9 @@ client.on('message', message => {
case 'meirl': case 'meirl':
message.channel.send((Math.floor(Math.random() * 2) == 0) ? subredditRequest('anime_irl') : imgurRequest('anime_irl', 5)); message.channel.send((Math.floor(Math.random() * 2) == 0) ? subredditRequest('anime_irl') : imgurRequest('anime_irl', 5));
break; break;
case 'animemes':
message.channel.send((Math.floor(Math.random() * 2) == 0) ? subredditRequest('animemes') : imgurRequest('animemes', 5));
break;
case 'moe': case 'moe':
message.channel.send((Math.floor(Math.random() * 2) == 0) ? redditbooruRequest('awwnime') : imgurRequest('awwnime', 5)); message.channel.send((Math.floor(Math.random() * 2) == 0) ? redditbooruRequest('awwnime') : imgurRequest('awwnime', 5));
break; break;
@@ -388,6 +391,9 @@ client.on('message', message => {
case 'neko': case 'neko':
message.channel.send((Math.floor(Math.random() * 2) == 0) ? imgurRequest('Nekomimi', 5) : subredditRequest('Nekomimi', 5)); message.channel.send((Math.floor(Math.random() * 2) == 0) ? imgurRequest('Nekomimi', 5) : subredditRequest('Nekomimi', 5));
break; break;
case 'pokeporn':
message.channel.send((Math.floor(Math.random() * 2) == 0) ? subredditRequest('pokeporn') : redditbooruRequest('pokeporn'));
break;
case 'hgifs': case 'hgifs':
message.channel.send(subredditRequest('nsfwanimegifs', 5)); message.channel.send(subredditRequest('nsfwanimegifs', 5));
break; break;