aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/Main.java
blob: a078bba70f26f7600f0c0eb14645ddfb50cb50d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import audio.Music;
import net.dv8tion.jda.api.events.session.ReadyEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import io.github.cdimascio.dotenv.Dotenv;

public class Main extends ListenerAdapter {
    private static final Dotenv dotenv = Dotenv.load();

    public static void main(String[] args) {
        new Music("$",
                readSetting("YOUTUBEAPIKEY"),
                readSetting("DISCORDTOKEN")
        );
    }

    public static String readSetting(String parameter) {
        String value = System.getenv(parameter);
        if (value != null) return value;
        return dotenv.get(parameter);
    }

    @Override
    public void onReady(ReadyEvent event) {
        System.out.println("Loading Complete");
    }
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage