📜  discord jda - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:27.509000             🧑  作者: Mango

代码示例1
public class DiscordBot {
  public static void main(String[] args) {
    JDABuilder jdaBuilder = JDABuilder.createDefault("TOKEN").setActivity(Activity.playing("Grepper"));
    JDA jda = null;
    try {
        jdaBuilder.build();
    } catch (LoginException e) {
         e.printStackTrace();
    }
    try {
        jda.awaitReady();
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
  }
}