diff options
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(); |