This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************** | |
* Variables * | |
****************/ | |
var foo = 99; | |
//"var" is the syntax used for declaring a variable. It doesn't matter what | |
//type of value you want to store in the variable, JavaScript doesn't care. | |
bar = 'banana'; | |
//omitting the "var" keyword will still create a variable (if it doesn't | |
//already exist in the scope), but it will be implicitly global. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var responses = [ | |
{ | |
outgoing : 'Why are you leaving me!?', | |
incoming : [ | |
'Welcome back!', 'Where were you!?', | |
'You saw that whore again, didn\'t you!?' | |
] | |
}, | |
{ | |
outgoing : 'Just go already!', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//solves #86, written by @Shmiddty: https://gist.github.com/Shmiddty/6829439 | |
(function () { | |
"use strict"; | |
// "user name" : {lastPing : Date.now(), msg : "afk message", returnMsg: "bot sends this when you return"} | |
var demAFKs = bot.memory.get( 'afk' ); | |
//5 minute limit between auto-responds. | |
var rateLimit = 5 * 60 * 1000; | |
var responses = [ |