use of pcl.lc.irc.entryClasses.CommandRateLimit in project LanteaBot by PC-Logix.
the class Exclamation method initCommands.
private void initCommands() {
CommandRateLimit limit = new CommandRateLimit(0, 5, 0, true, false);
command_curse_word = new Command("curseword", limit) {
@Override
public CommandChainStateObject onExecuteSuccess(Command command, String nick, String target, GenericMessageEvent event, String params) {
Helper.sendMessage(target, getRandomExpression(TypeFilter.CURSE_WORD) + TablesOfRandomThings.getRandomExclamations(true, false), nick);
return new CommandChainStateObject();
}
};
command_curse_word.registerAlias("curses");
command_curse_word.registerAlias("cursewd");
command_curse_word.registerAlias("cursew");
command_curse_word.registerAlias("swear");
command_curse_word.registerAlias("swearword");
command_curse_word.setHelpText("Holy manbats Batman!");
command_exclamation = new Command("exclamation", limit) {
@Override
public CommandChainStateObject onExecuteSuccess(Command command, String nick, String target, GenericMessageEvent event, String params) {
Helper.sendMessage(target, getRandomExpression(TypeFilter.ALL) + TablesOfRandomThings.getRandomExclamations(true, false), nick);
return new CommandChainStateObject();
}
};
command_exclamation.registerAlias("excl");
command_exclamation.setHelpText("Wot in tarnation?!");
}
use of pcl.lc.irc.entryClasses.CommandRateLimit in project LanteaBot by PC-Logix.
the class Smash method initCommands.
private void initCommands() {
local_command = new Command("smash", new CommandRateLimit(30, true)) {
@Override
public CommandChainStateObject onExecuteSuccess(Command command, String nick, String target, GenericMessageEvent event, String params) {
Helper.sendMessage(target, nick + " smashes " + TablesOfRandomThings.getRandomSmashString(true, true));
return new CommandChainStateObject();
}
};
local_command.setHelpText("If you ever feel the need to let off some steam.");
}
use of pcl.lc.irc.entryClasses.CommandRateLimit in project LanteaBot by PC-Logix.
the class SED method initHook.
@Override
protected void initHook() {
local_command = new Command("sed", new CommandRateLimit(10), Permissions.MOD) {
@Override
public CommandChainStateObject onExecuteSuccess(Command command, String nick, String target, GenericMessageEvent event, String params) {
if (params.equals("disable") || params.equals("enable")) {
Helper.toggleCommand("SED", target, params);
} else {
String isEnabled = Helper.isEnabledHere(target, "SED") ? "enabled" : "disabled";
Helper.sendMessage(target, "SED is " + isEnabled + " in this channel", nick);
}
return new CommandChainStateObject();
}
};
local_command.setHelpText("SED Operations");
IRCBot.registerCommand(local_command);
}
use of pcl.lc.irc.entryClasses.CommandRateLimit in project LanteaBot by PC-Logix.
the class Care method initHook.
@Override
protected void initHook() {
local_command = new Command("care", new CommandRateLimit(60)) {
@Override
public CommandChainStateObject onExecuteSuccess(Command command, String nick, String target, GenericMessageEvent event, ArrayList<String> params) {
Helper.sendMessage(target, TablesOfRandomThings.getCareDetectorResponse(), nick);
return new CommandChainStateObject();
}
};
local_command.registerAlias("care-o-meter");
local_command.registerAlias("careometer");
local_command.registerAlias("doicare");
local_command.registerAlias("howmuchcare");
local_command.setHelpText("Measure care levels");
IRCBot.registerCommand(local_command);
}
Aggregations