use of com.discordbolt.api.command.CommandManager in project BoltBot by DiscordBolt.
the class BoltBot method registerModules.
private static void registerModules(IDiscordClient client) {
// API Modules
Logger.trace("Loading API modules.");
client.getDispatcher().registerListener(new DataSync(client));
commandManager = new CommandManager(client, "com.discordbolt.boltbot");
client.getGuilds().stream().map(g -> GuildData.getById(g.getLongID())).filter(Optional::isPresent).filter(gd -> gd.get().getCommandPrefix() != null).forEach(gd -> commandManager.setCommandPrefix(client.getGuildByID(gd.get().getGuildId()), gd.get().getCommandPrefix().charAt(0)));
Logger.trace("Finished loading API modules");
// Feature Modules
Logger.trace("Loading feature modules.");
client.getModuleLoader().loadModule(new MusicModule(client));
client.getModuleLoader().loadModule(new CuntModule(client));
client.getModuleLoader().loadModule(new DiceModule(client));
client.getModuleLoader().loadModule(new DisconnectModule(client));
client.getModuleLoader().loadModule(new RedditModule(client));
client.getModuleLoader().loadModule(new TableFixerModule(client));
client.getModuleLoader().loadModule(new SeenModule(client));
client.getModuleLoader().loadModule(new StatusModule(client));
client.getModuleLoader().loadModule(new TagModule(client));
client.getModuleLoader().loadModule(new TwitchModule(client));
Logger.trace("Finished loading feature modules.");
}
Aggregations