use of com.greatmancode.legendarybot.plugin.botgeneral.commands.InviteCommand in project legendarybot by greatman.
the class BotGeneralPlugin method start.
@Override
public void start() {
getBot().getCommandHandler().addCommand("invite", new InviteCommand(getBot()), "General Commands");
log.info("Command !invite loaded!");
getBot().getCommandHandler().addCommand("help", new HelpCommand(getBot()), "General Commands");
log.info("Command !help loaded!");
getBot().getCommandHandler().addCommand("info", new InfoCommand(getBot()), "General Commands");
// We find our main guild
Guild guild = null;
for (JDA jda : getBot().getJDA()) {
Guild guildEntry = jda.getGuildById("330748360673722381");
if (guildEntry != null) {
guild = guildEntry;
}
}
listener = new MessageListener(guild);
getBot().getJDA().forEach(jda -> jda.addEventListener(listener));
}
Aggregations