WIP
This commit is contained in:
parent
37f19687df
commit
27ffd07bcc
@ -15,6 +15,27 @@
|
||||
alert(subscriber.toUpperCase(), "NEW SUBSCRIBER", "subscribe");
|
||||
});
|
||||
|
||||
$.bind('command', function(event) {
|
||||
const sender = "" + event.getSender().toLowerCase(),
|
||||
command = event.getCommand(),
|
||||
args = event.getArgs(),
|
||||
action = args[0];
|
||||
|
||||
if (command.equalsIgnoreCase('calert')) {
|
||||
if (!action) {
|
||||
$.say($.whisperPrefix(sender) + $.lang.get('calert.help', ' Use "!calert [follow | subsribe | donation] user" to trigger alert.'));
|
||||
} else if (action.equalsIgnoreCase('follow')) {
|
||||
alert(args[1].toUpperCase(), "NEW FOLLOWER", "follow");
|
||||
} else if (action.equalsIgnoreCase('subscribe')) {
|
||||
alert(args[1].toUpperCase(), "NEW SUBSCRIBER", "subscribe");
|
||||
} else if (action.equalsIgnoreCase('donation')) {
|
||||
alert(args[1].toUpperCase(), "NEW DONATION", "donation");
|
||||
} else {
|
||||
$.say($.whisperPrefix(sender) + $.lang.get('calert.help', ' Use "!calert [follow | subsribe | donation] user" to trigger alert.'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.bind('initReady', function() {
|
||||
$.registerChatCommand('./custom/custom/customAlerts.js', 'calert');
|
||||
$.registerChatSubcommand('calert', 'follow', 2);
|
||||
|
@ -141,7 +141,7 @@ $(async function () {
|
||||
this.setPhysics(randRange(0,canvas.width),
|
||||
randRange(0,canvas.height),
|
||||
0,0,0,0);
|
||||
this.sete = emote ? emote:null
|
||||
this.sete = emote ? emote:[]
|
||||
this.emote = Array.isArray(emote)? randEmote(this.sete) : emote
|
||||
this.time = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user