geforkt von SteamWar/BungeeCore
Add SteamwarDiscordBot rich presence
Dieser Commit ist enthalten in:
Ursprung
f6e6c191a7
Commit
6a036808d5
@ -31,6 +31,7 @@ import net.dv8tion.jda.api.entities.Activity;
|
||||
import net.dv8tion.jda.api.entities.ActivityFlag;
|
||||
import net.dv8tion.jda.api.entities.RichPresence;
|
||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
||||
import net.dv8tion.jda.internal.entities.RichPresenceImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -51,16 +52,7 @@ public class SteamwarDiscordBot {
|
||||
public SteamwarDiscordBot() {
|
||||
INSTANCE = this;
|
||||
JDABuilder builder = JDABuilder.createDefault(SteamwarDiscordBotConfig.TOKEN);
|
||||
builder.setActivity(new Activity() {
|
||||
@Override
|
||||
public boolean isRich() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public RichPresence asRichPresence() {
|
||||
return new RichPresence() {
|
||||
builder.setActivity(new RichPresence() {
|
||||
@Override
|
||||
public long getApplicationIdLong() {
|
||||
return 0;
|
||||
@ -97,19 +89,19 @@ public class SteamwarDiscordBot {
|
||||
@Nullable
|
||||
@Override
|
||||
public String getState() {
|
||||
return "Test";
|
||||
return "SteamWar";
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getDetails() {
|
||||
return "Test";
|
||||
return "SteamWar";
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Party getParty() {
|
||||
return new Party("", 0, 1);
|
||||
return new Party("", 0, 0);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@ -126,7 +118,7 @@ public class SteamwarDiscordBot {
|
||||
|
||||
@Override
|
||||
public boolean isRich() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@ -150,41 +142,9 @@ public class SteamwarDiscordBot {
|
||||
@NotNull
|
||||
@Override
|
||||
public ActivityType getType() {
|
||||
return ActivityType.DEFAULT;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Timestamps getTimestamps() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Emoji getEmoji() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getName() {
|
||||
return "SteamWar";
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getUrl() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ActivityType getType() {
|
||||
return ActivityType.DEFAULT;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Timestamps getTimestamps() {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren