more changes

This commit is contained in:
root 2017-03-24 16:19:13 -05:00
parent ac667ec74f
commit 3e44937fd3
5 changed files with 3448 additions and 34 deletions

94
bot.js
View File

@ -59,21 +59,36 @@ setInterval(function() {
e.message.channel.sendMessage("pong");
// !bacon
if (e.message.content == "!bacon")
e.message.channel.sendMessage("*gives " + e.message.author.nickMention + " a strip of delicious bacon.* ")
if (e.message.content.match(/^!bacon/))
if (e.message.content !== "!bacon") {
var input = e.message.content
var fields = input.split(' ', 2)
var user = client.Users.find(u => u.username == fields[1]);
if (user == null) {
e.message.channel.sendMessage("Username not found.");
} else {
e.message.channel.sendMessage("*gives " + user.mention + " a strip of delicious bacon on behalf of " + e.message.author.nickMention + " *" );
}
} else {
e.message.channel.sendMessage("*gives " + e.message.author.nickMention + " a strip of delicious bacon.* ")
}
// !cookie
// if (e.message.content.indexOf("!cookie") >=0) {
if (e.message.content == "!cookie") {
e.message.channel.sendMessage("*gives " + e.message.author.nickMention + " a freshly made Oatmeal Raisin cookie.*")
// if (e.message.content !== "!cookie") {
// var input = e.message.content
// var fields = input.split(' ', 2)
// var user = client.Users.find(u => u.username == fields[1]);
// e.message.channel.sendMessage("*gives " + user.mention[fields[1] + " a freshly made Oatmeal Raisin cookie.*")
// } else {
// e.message.channel.sendMessage("*gives " + e.message.author.nickMention + " a freshly made Oatmeal Raisin cookie.*")
// }
if (e.message.content.match(/^!cookie/) ) {
var cookiearray = [ 'oatmeal raisin', 'sugar', 'chocolate chip', 'oatmeal', 'M&M', 'white chocolate macadamia nut' ]
var cookie = cookiearray[Math.floor(Math.random()*cookiearray.length)];
if (e.message.content !== "!cookie") {
var input = e.message.content
var fields = input.split(' ', 2)
var user = client.Users.find(u => u.username == fields[1]);
if (user == null) {
e.message.channel.sendMessage("Username not found.");
} else {
e.message.channel.sendMessage("*gives " + user.mention + " a freshly made " + cookie + " cookie on behalf of " + e.message.author.nickMention + ".*" );
}
} else {
e.message.channel.sendMessage("*gives " + e.message.author.nickMention + " a freshly made " + cookie + " cookie.*")
}
}
@ -81,34 +96,45 @@ setInterval(function() {
if (e.message.content == "!help")
e.message.channel.sendMessage("Sorry.");
// !commands
if (e.message.content == "!commands")
e.message.channel.sendMessage(config.botname + " commands: \r\
**!bacon [username] / !bacon** - Free bacon!\r\
**!cookie [username] / !cookie** - Free cookies!\r\r\
-- Upcoming and Not-Yet-Functional Commands -- \r\
**!w** - Weather\r\
**!ud** - Urban Dictionary lookup")
// end chat commands
// begin Baymax easter eggs
// ow
if (e.message.content == "ow" || e.message.content == "Ow" || e.message.content == "OW" || e.message.content == "oW" || e.message.content == "Ow!" || e.message.content == "Ow.")
e.message.channel.sendMessage("Hello. I am Baymax, your personal Discord companion. \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294326730703896577/giphy-2.gif");
if (config.botname == "Baymax") {
// ow
if (e.message.content == "ow" || e.message.content == "Ow" || e.message.content == "OW" || e.message.content == "oW" || e.message.content == "Ow!" || e.message.content == "Ow.")
e.message.channel.sendMessage("Hello. I am Baymax, your personal Discord companion. \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294326730703896577/giphy-2.gif");
// heart attack
if (e.message.content.indexOf('heart attack') >=0)
e.message.channel.sendMessage("My hands are equipped with defibrillators. **CLEAR!** \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294302721429995520/tumblr_n9h0l4ODbC1ry7whco1_1280.gif");
// heart attack
if (e.message.content.indexOf('heart attack') >=0)
e.message.channel.sendMessage("My hands are equipped with defibrillators. **CLEAR!** \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294302721429995520/tumblr_n9h0l4ODbC1ry7whco1_1280.gif");
// Cry emoji... There's actually a emoji there, I swear.
if (e.message.content == "😢")
e.message.channel.sendMessage("There, there. \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294303907704864770/giphy-4.gif");
// Cry emoji... There's actually a emoji there, I swear.
if (e.message.content == "😢")
e.message.channel.sendMessage("There, there. \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294303907704864770/giphy-4.gif");
// fist bump
if (e.message.content == "*fist bump*" || e.message.content == "*fistbump*")
e.message.channel.sendMessage("Ba-la-la-la-la! \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294327036388835328/giphy-3.gif");
// !lollipop
if (e.message.content == "I'm satisfied with my care.")
e.message.channel.sendMessage("You have been good, have a lollipop! \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294333704749449216/Baemax-baymax-lollipop.gif");
// fist bump
if (e.message.content == "*fist bump*" || e.message.content == "*fistbump*")
e.message.channel.sendMessage("Ba-la-la-la-la! \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294327036388835328/giphy-3.gif");
// !lollipop
if (e.message.content == "I'm satisfied with my care.")
e.message.channel.sendMessage("You have been good, have a lollipop! \r\r\
https://cdn.discordapp.com/attachments/265064665099403264/294333704749449216/Baemax-baymax-lollipop.gif");
}
// end Baymax easter eggs
// begin misc chat triggers

View File

@ -1,4 +1,5 @@
{
"botname": "Baymax",
"bot_token": "MjI3Mjg0MjQxMjQ1OTI5NDcy.C7TLvA.mUGWHxjW0gG71kaL-F93VMzw95E",
"guild_id": "173239631867805703",
"guild_name": "/r/littlespace",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -474,3 +474,81 @@
[2017-03-23 22:13:34.074] [INFO] console - Connected as: Thor
[2017-03-23 23:13:33.479] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-23 23:13:34.071] [INFO] console - Connected as: Thor
[2017-03-23 23:57:38.901] [INFO] console - Connected as: Thor
[2017-03-24 00:57:37.855] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 00:57:38.587] [INFO] console - Connected as: Thor
[2017-03-24 01:57:37.878] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 01:57:38.460] [INFO] console - Connected as: Thor
[2017-03-24 02:27:12.501] [INFO] console - Disconnected from server ...
[2017-03-24 02:27:12.501] [INFO] console - Reconnecting to Discord ...
[2017-03-24 02:27:14.105] [INFO] console - Connected as: Thor
[2017-03-24 02:57:37.890] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 02:57:39.147] [INFO] console - Connected as: Thor
[2017-03-24 03:49:00.600] [INFO] console - Disconnected from server ...
[2017-03-24 03:49:00.601] [INFO] console - Reconnecting to Discord ...
[2017-03-24 03:49:00.964] [INFO] console - Connected as: Thor
[2017-03-24 03:57:37.925] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 03:57:39.131] [INFO] console - Connected as: Thor
[2017-03-24 04:57:37.934] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 04:57:39.012] [INFO] console - Connected as: Thor
[2017-03-24 05:57:37.949] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 05:57:38.765] [INFO] console - Connected as: Thor
[2017-03-24 06:19:11.997] [INFO] console - Disconnected from server ...
[2017-03-24 06:19:11.998] [INFO] console - Reconnecting to Discord ...
[2017-03-24 06:19:12.545] [INFO] console - Connected as: Thor
[2017-03-24 06:42:00.546] [INFO] console - Disconnected from server ...
[2017-03-24 06:42:00.547] [INFO] console - Reconnecting to Discord ...
[2017-03-24 06:42:00.917] [INFO] console - Connected as: Thor
[2017-03-24 06:57:37.964] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 06:57:38.669] [INFO] console - Connected as: Thor
[2017-03-24 07:57:37.977] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 07:57:38.714] [INFO] console - Connected as: Thor
[2017-03-24 08:57:38.022] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 08:57:39.260] [INFO] console - Connected as: Thor
[2017-03-24 09:57:38.041] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 09:57:38.506] [INFO] console - Connected as: Thor
[2017-03-24 10:57:38.069] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 10:57:38.603] [INFO] console - Connected as: Thor
[2017-03-24 11:57:38.088] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 11:57:38.648] [INFO] console - Connected as: Thor
[2017-03-24 12:57:38.101] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 12:57:38.583] [INFO] console - Connected as: Thor
[2017-03-24 13:57:38.114] [INFO] console - Reconnecting to server per timeout of 3600000ms.
[2017-03-24 13:57:38.694] [INFO] console - Connected as: Thor
[2017-03-24 14:36:34.588] [INFO] console - Disconnected from server ...
[2017-03-24 14:36:34.588] [INFO] console - Reconnecting to Discord ...
[2017-03-24 14:36:34.916] [INFO] console - Connected as: Thor
[2017-03-24 14:54:18.711] [INFO] console - Connected as: Thor
[2017-03-24 14:55:13.232] [INFO] console - Connected as: Thor
[2017-03-24 14:56:41.765] [INFO] console - Connected as: Thor
[2017-03-24 14:57:53.312] [INFO] console - Connected as: Thor
[2017-03-24 14:59:30.822] [INFO] console - Connected as: Thor
[2017-03-24 15:01:21.287] [INFO] console - Connected as: Thor
[2017-03-24 15:02:03.916] [INFO] console - Connected as: Thor
[2017-03-24 15:25:33.707] [INFO] console - Connected as: Thor
[2017-03-24 15:26:43.022] [INFO] console - Connected as: Thor
[2017-03-24 15:27:29.640] [INFO] console - Connected as: Thor
[2017-03-24 15:27:34.700] [INFO] console - Connected as: Thor
[2017-03-24 15:29:30.250] [INFO] console - Connected as: Thor
[2017-03-24 15:29:53.590] [INFO] console - Connected as: Thor
[2017-03-24 15:30:52.177] [INFO] console - Connected as: Thor
[2017-03-24 15:31:01.239] [INFO] console - Connected as: Thor
[2017-03-24 15:31:16.549] [INFO] console - Connected as: Thor
[2017-03-24 15:32:15.743] [INFO] console - Connected as: Thor
[2017-03-24 15:37:18.881] [INFO] console - Connected as: Thor
[2017-03-24 15:39:19.848] [INFO] console - Connected as: Thor
[2017-03-24 15:40:24.668] [INFO] console - Connected as: Thor
[2017-03-24 15:47:05.259] [INFO] console - Connected as: Thor
[2017-03-24 15:47:20.644] [INFO] console - Connected as: Thor
[2017-03-24 15:48:16.584] [INFO] console - Connected as: Thor
[2017-03-24 15:48:35.324] [INFO] console - Connected as: Thor
[2017-03-24 15:48:46.854] [INFO] console - Connected as: Thor
[2017-03-24 15:51:02.453] [INFO] console - Connected as: Thor
[2017-03-24 15:59:01.891] [INFO] console - Connected as: Thor
[2017-03-24 15:59:40.607] [INFO] console - Connected as: Thor
[2017-03-24 16:00:16.802] [INFO] console - Connected as: Thor
[2017-03-24 16:00:22.113] [INFO] console - Connected as: Thor
[2017-03-24 16:00:34.503] [INFO] console - Connected as: Thor
[2017-03-24 16:01:46.427] [INFO] console - Connected as: Thor
[2017-03-24 16:01:58.728] [INFO] console - Connected as: Thor
[2017-03-24 16:02:08.228] [INFO] console - Connected as: Thor