Merge branch 'JDAv5'
# Conflicts: # src/main/java/AtlasGruppe/groupchange.java # src/main/java/core/Main.java
This commit is contained in:
4
src/main/java/core/Controller.java
Executable file
4
src/main/java/core/Controller.java
Executable file
@ -0,0 +1,4 @@
|
||||
package core;
|
||||
|
||||
public class Controller {
|
||||
}
|
||||
@ -1,42 +1,40 @@
|
||||
package core;
|
||||
|
||||
|
||||
import AtlasGruppe.groupchange;
|
||||
import net.dv8tion.jda.core.JDA;
|
||||
import net.dv8tion.jda.core.JDABuilder;
|
||||
import net.dv8tion.jda.core.AccountType;
|
||||
import net.dv8tion.jda.core.OnlineStatus;
|
||||
import net.dv8tion.jda.core.entities.Game;
|
||||
|
||||
|
||||
import javax.security.auth.login.LoginException;
|
||||
//import Serenity.balance;
|
||||
import net.dv8tion.jda.api.JDA;
|
||||
import net.dv8tion.jda.api.JDABuilder;
|
||||
import net.dv8tion.jda.api.OnlineStatus;
|
||||
import net.dv8tion.jda.api.entities.*;
|
||||
import net.dv8tion.jda.api.requests.GatewayIntent;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Config conf = new Config();
|
||||
conf.readConfig();
|
||||
// Insert your bot's token here
|
||||
//String token = "NTQ3MDc5NzgzNDE1MjgzNzEy.D0xjRw.ydeX_ou_pAqN_DCSwyGHzQUGBBk";
|
||||
String token = conf.token;
|
||||
String token = "NTQ2ODk5MzYwMDEzODc3MjU4.D0u8wA.VfA2vJzundVhCl1-ibDiBaKuA8w";
|
||||
// iro
|
||||
//String token = "NTQ2NzEwODUwOTIxMjk5OTc5.D0sL6A.1fUd5iBr3eo2tbPXofEqyumDm6w";
|
||||
|
||||
JDABuilder builder = new JDABuilder(AccountType.BOT);
|
||||
JDA jda = JDABuilder.createDefault(token)
|
||||
.enableIntents(GatewayIntent.MESSAGE_CONTENT)
|
||||
.setActivity(Activity.playing("mit den Würfeln"))
|
||||
.setStatus(OnlineStatus.ONLINE)
|
||||
//.addEventListeners(new dice())
|
||||
.addEventListeners(new Earthdawn.dice())
|
||||
.addEventListeners(new Simpleroll.dice())
|
||||
.addEventListeners(new Shadowrun.dice())
|
||||
.addEventListeners(new Engel.dice())
|
||||
.addEventListeners(new Keeproll.dice())
|
||||
.setAutoReconnect(true)
|
||||
.build();
|
||||
|
||||
//jda.upsertCommand("sr", "Calculate ping of the bot").queue();
|
||||
|
||||
// Thread thread = new Thread(new shadowrun(jda));
|
||||
//thread.start();
|
||||
|
||||
builder.setToken(token);
|
||||
builder.setAutoReconnect(true);
|
||||
builder.setStatus(OnlineStatus.ONLINE);
|
||||
builder.setGame(Game.watching(conf.GameWatching));
|
||||
builder.addEventListener(new groupchange(conf));
|
||||
|
||||
try {
|
||||
JDA jda = builder.build();
|
||||
}
|
||||
catch (LoginException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
8
src/main/java/core/sample.fxml
Executable file
8
src/main/java/core/sample.fxml
Executable file
@ -0,0 +1,8 @@
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<GridPane fx:controller="core.Controller"
|
||||
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10">
|
||||
</GridPane>
|
||||
Reference in New Issue
Block a user