From e175257892510877635d549e8b7890aff1d8ea31 Mon Sep 17 00:00:00 2001 From: Matt Kohls Date: Sun, 28 Jun 2020 23:27:53 -0400 Subject: Updating depreciated methods --- src/main/java/soundchan/Main.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/soundchan/Main.java') 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(); -- cgit v1.2.3