Get ICCED, dummy
This commit is contained in:
parent
21616aeaaf
commit
88d1a56647
@ -9,6 +9,8 @@ using StringTools;
|
|||||||
class Onequestionmark {
|
class Onequestionmark {
|
||||||
static var Bot:DiscordClient;
|
static var Bot:DiscordClient;
|
||||||
static var settings:Dynamic;
|
static var settings:Dynamic;
|
||||||
|
static var botInfo:Dynamic;
|
||||||
|
static var iceRegex:EReg = ~/\bicc?ed?\b/i;
|
||||||
|
|
||||||
static function main() {
|
static function main() {
|
||||||
|
|
||||||
@ -27,6 +29,7 @@ class Onequestionmark {
|
|||||||
Bot = new DiscordClient(settings.token, [3276799], settings.debug);
|
Bot = new DiscordClient(settings.token, [3276799], settings.debug);
|
||||||
Bot.onReady = onReady;
|
Bot.onReady = onReady;
|
||||||
Bot.onMessageCreate = onMessageCreate;
|
Bot.onMessageCreate = onMessageCreate;
|
||||||
|
botInfo = Endpoints.getCurrentUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function onReady() {
|
public static function onReady() {
|
||||||
@ -103,6 +106,7 @@ class Onequestionmark {
|
|||||||
|
|
||||||
// Non-command responses
|
// Non-command responses
|
||||||
if ((msg.charAt(0) == ".") && (msg.length == 1)) {m.reply({content:"omg a meteor"}, true);}
|
if ((msg.charAt(0) == ".") && (msg.length == 1)) {m.reply({content:"omg a meteor"}, true);}
|
||||||
|
if ((iceRegex.match(msg)) && (m.author.id != botInfo.id)) {m.reply({content:"Did some carbon-based lifeform just say **I C E**?"});}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user