Search in sources :

Example 1 with SeenModule

use of com.discordbolt.boltbot.modules.seen.SeenModule 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.");
}
Also used : CuntModule(com.discordbolt.boltbot.modules.misc.CuntModule) TwitchModule(com.discordbolt.boltbot.modules.twitch.TwitchModule) TagModule(com.discordbolt.boltbot.modules.tags.TagModule) TableFixerModule(com.discordbolt.boltbot.modules.misc.TableFixerModule) MySQL(com.discordbolt.boltbot.system.mysql.MySQL) GuildData(com.discordbolt.boltbot.system.mysql.data.persistent.GuildData) ReadyEvent(sx.blah.discord.handle.impl.events.ReadyEvent) IDiscordClient(sx.blah.discord.api.IDiscordClient) DiceModule(com.discordbolt.boltbot.modules.dice.DiceModule) SQLException(java.sql.SQLException) CommandManager(com.discordbolt.api.command.CommandManager) SeenModule(com.discordbolt.boltbot.modules.seen.SeenModule) DataSync(com.discordbolt.boltbot.system.mysql.data.DataSync) MusicModule(com.discordbolt.boltbot.modules.music.MusicModule) Optional(java.util.Optional) RedditModule(com.discordbolt.boltbot.modules.reddit.RedditModule) IListener(sx.blah.discord.api.events.IListener) StatusModule(com.discordbolt.boltbot.system.status.StatusModule) Logger(com.discordbolt.boltbot.utils.Logger) DisconnectModule(com.discordbolt.boltbot.modules.disconnect.DisconnectModule) ClientBuilder(sx.blah.discord.api.ClientBuilder) CuntModule(com.discordbolt.boltbot.modules.misc.CuntModule) RedditModule(com.discordbolt.boltbot.modules.reddit.RedditModule) SeenModule(com.discordbolt.boltbot.modules.seen.SeenModule) Optional(java.util.Optional) StatusModule(com.discordbolt.boltbot.system.status.StatusModule) TableFixerModule(com.discordbolt.boltbot.modules.misc.TableFixerModule) CommandManager(com.discordbolt.api.command.CommandManager) DisconnectModule(com.discordbolt.boltbot.modules.disconnect.DisconnectModule) TwitchModule(com.discordbolt.boltbot.modules.twitch.TwitchModule) DataSync(com.discordbolt.boltbot.system.mysql.data.DataSync) MusicModule(com.discordbolt.boltbot.modules.music.MusicModule) DiceModule(com.discordbolt.boltbot.modules.dice.DiceModule) TagModule(com.discordbolt.boltbot.modules.tags.TagModule)

Aggregations

CommandManager (com.discordbolt.api.command.CommandManager)1 DiceModule (com.discordbolt.boltbot.modules.dice.DiceModule)1 DisconnectModule (com.discordbolt.boltbot.modules.disconnect.DisconnectModule)1 CuntModule (com.discordbolt.boltbot.modules.misc.CuntModule)1 TableFixerModule (com.discordbolt.boltbot.modules.misc.TableFixerModule)1 MusicModule (com.discordbolt.boltbot.modules.music.MusicModule)1 RedditModule (com.discordbolt.boltbot.modules.reddit.RedditModule)1 SeenModule (com.discordbolt.boltbot.modules.seen.SeenModule)1 TagModule (com.discordbolt.boltbot.modules.tags.TagModule)1 TwitchModule (com.discordbolt.boltbot.modules.twitch.TwitchModule)1 MySQL (com.discordbolt.boltbot.system.mysql.MySQL)1 DataSync (com.discordbolt.boltbot.system.mysql.data.DataSync)1 GuildData (com.discordbolt.boltbot.system.mysql.data.persistent.GuildData)1 StatusModule (com.discordbolt.boltbot.system.status.StatusModule)1 Logger (com.discordbolt.boltbot.utils.Logger)1 SQLException (java.sql.SQLException)1 Optional (java.util.Optional)1 ClientBuilder (sx.blah.discord.api.ClientBuilder)1 IDiscordClient (sx.blah.discord.api.IDiscordClient)1 IListener (sx.blah.discord.api.events.IListener)1