Search in sources :

Example 1 with ReadyListener

use of io.github.spugn.Sargo.Listeners.ReadyListener in project S-argo by Expugn.

the class Sargo method main.

public static void main(String[] args) {
    File settingsFile = new File("data/Settings.xml");
    if (!(settingsFile.exists())) {
        LOGGER.error("\nSettings.xml is not found!\nPlace it in the appropriate location before continuing.");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            System.exit(0);
        }
        System.exit(0);
    }
    Reload.silentReloadSettings();
    CLIENT = buildBot(SettingsParser.getBotToken());
    EventDispatcher dispatcher = CLIENT.getDispatcher();
    dispatcher.registerListener(new ReadyListener(CLIENT));
    dispatcher.registerListener(new MessageListener(CLIENT));
}
Also used : ReadyListener(io.github.spugn.Sargo.Listeners.ReadyListener) EventDispatcher(sx.blah.discord.api.events.EventDispatcher) MessageListener(io.github.spugn.Sargo.Listeners.MessageListener) File(java.io.File)

Aggregations

MessageListener (io.github.spugn.Sargo.Listeners.MessageListener)1 ReadyListener (io.github.spugn.Sargo.Listeners.ReadyListener)1 File (java.io.File)1 EventDispatcher (sx.blah.discord.api.events.EventDispatcher)1