diff options
author | Matt Kohls <mattkohls13@gmail.com> | 2020-06-28 23:27:53 -0400 |
---|---|---|
committer | Matt Kohls <mattkohls13@gmail.com> | 2020-06-28 23:27:53 -0400 |
commit | e175257892510877635d549e8b7890aff1d8ea31 (patch) | |
tree | 5719d792c31bfa4a8acc72c126403c7bd81323e4 /src/main/java/soundchan/Main.java | |
parent | 8181375ae88c714dae2d7f0a396a46c95e5dcbca (diff) | |
download | SoundChan-e175257892510877635d549e8b7890aff1d8ea31.tar.gz SoundChan-e175257892510877635d549e8b7890aff1d8ea31.tar.bz2 SoundChan-e175257892510877635d549e8b7890aff1d8ea31.zip |
Updating depreciated methods
Diffstat (limited to 'src/main/java/soundchan/Main.java')
-rw-r--r-- | src/main/java/soundchan/Main.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/soundchan/Main.java b/src/main/java/soundchan/Main.java index 587c7e9..0021aba 100644 --- a/src/main/java/soundchan/Main.java +++ b/src/main/java/soundchan/Main.java @@ -1,8 +1,7 @@ package soundchan; -import net.dv8tion.jda.api.AccountType; import net.dv8tion.jda.api.JDA; -import net.dv8tion.jda.api.JDABuilder; +import net.dv8tion.jda.api.requests.GatewayIntent; import soundchan.BotListener.*; import java.io.FileInputStream; @@ -10,13 +9,15 @@ import java.io.IOException; import java.io.InputStream; import java.util.*; +import static net.dv8tion.jda.api.JDABuilder.createDefault; + public class Main { public static void main(String[] args) throws Exception { Properties properties = LoadProperties(); - JDA jda = new JDABuilder(AccountType.BOT) - .setToken(properties.getProperty("botToken")) + JDA jda = createDefault(properties.getProperty("botToken")) + .enableIntents(GatewayIntent.GUILD_MESSAGES) .addEventListeners(new BotListener(properties)) .build(); jda.awaitReady(); |