package co.phoenixlab.discord;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sx.blah.discord.DiscordClient;

public class VahrhedralBot implements Runnable {

    public static final Logger LOGGER = LoggerFactory.getLogger("VahrhedralBot");

    public static void main(String[] args) {
        LOGGER.info("Starting Vahrhedral bot");
        try {
            VahrhedralBot bot = new VahrhedralBot();
            bot.run();
        } catch (Exception e) {
            LOGGER.error("Fatal error while running bot", e);
        }
        LOGGER.info("Vahrhedral bot stopped");
    }

    private DiscordClient discord;

    public VahrhedralBot() {
        discord = DiscordClient.get();
    }

    @Override
    public void run() {
        //  TODO

    }



}

@@ -25,16 +25,62 @@
 scord;%0A%0A
+import org.json.simple.parser.ParseException;%0A
 import o
@@ -96,16 +96,16 @@
 Logger;%0A
-
 import o
@@ -167,16 +167,136 @@
 lient;%0A%0A
+import java.io.IOException;%0Aimport java.net.URISyntaxException;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0A%0A
 public c
@@ -795,16 +795,50 @@
 discord;
+%0A    private Configuration config;
 %0A%0A    pu
@@ -961,16 +961,734 @@
 /  TODO%0A
+        //  Load Config%0A        try %7B%0A            config = loadConfiguration(Paths.get(%22config.json%22));%0A        %7D catch (IOException e) %7B%0A            LOGGER.error(%22Unable to load configuration%22, e);%0A            return;%0A        %7D%0A        try %7B%0A            discord.login(config.getEmail(), config.getPassword());%0A        %7D catch (IOException %7C ParseException %7C URISyntaxException e) %7B%0A            LOGGER.error(%22Unable to log in%22, e);%0A            return;%0A        %7D%0A        if (!discord.isReady()) %7B%0A            LOGGER.error(%22Discord client is not ready%22);%0A            return;%0A        %7D%0A    %7D%0A%0A    private Configuration loadConfiguration(Path path) throws IOException %7B%0A        //  TODO%0A        return new Configuration();
 %0A    %7D%0A%0A

Add basic Discord client log in