SteamWar/BungeeCore
Archiviert
13
2

Add SteamwarDiscordBot rich presence

Dieser Commit ist enthalten in:
yoyosource 2021-07-28 15:14:14 +02:00
Ursprung f6e6c191a7
Commit 6a036808d5

Datei anzeigen

@ -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,7 +52,70 @@ public class SteamwarDiscordBot {
public SteamwarDiscordBot() {
INSTANCE = this;
JDABuilder builder = JDABuilder.createDefault(SteamwarDiscordBotConfig.TOKEN);
builder.setActivity(new Activity() {
builder.setActivity(new RichPresence() {
@Override
public long getApplicationIdLong() {
return 0;
}
@NotNull
@Override
public String getApplicationId() {
return "SteamWar";
}
@Nullable
@Override
public String getSessionId() {
return null;
}
@Nullable
@Override
public String getSyncId() {
return null;
}
@Override
public int getFlags() {
return 0;
}
@Override
public EnumSet<ActivityFlag> getFlagSet() {
return EnumSet.of(ActivityFlag.PLAY);
}
@Nullable
@Override
public String getState() {
return "SteamWar";
}
@Nullable
@Override
public String getDetails() {
return "SteamWar";
}
@Nullable
@Override
public Party getParty() {
return new Party("", 0, 0);
}
@Nullable
@Override
public Image getLargeImage() {
return null;
}
@Nullable
@Override
public Image getSmallImage() {
return null;
}
@Override
public boolean isRich() {
return true;
@ -60,111 +124,7 @@ public class SteamwarDiscordBot {
@Nullable
@Override
public RichPresence asRichPresence() {
return new RichPresence() {
@Override
public long getApplicationIdLong() {
return 0;
}
@NotNull
@Override
public String getApplicationId() {
return "SteamWar";
}
@Nullable
@Override
public String getSessionId() {
return null;
}
@Nullable
@Override
public String getSyncId() {
return null;
}
@Override
public int getFlags() {
return 0;
}
@Override
public EnumSet<ActivityFlag> getFlagSet() {
return EnumSet.of(ActivityFlag.PLAY);
}
@Nullable
@Override
public String getState() {
return "Test";
}
@Nullable
@Override
public String getDetails() {
return "Test";
}
@Nullable
@Override
public Party getParty() {
return new Party("", 0, 1);
}
@Nullable
@Override
public Image getLargeImage() {
return null;
}
@Nullable
@Override
public Image getSmallImage() {
return null;
}
@Override
public boolean isRich() {
return false;
}
@Nullable
@Override
public RichPresence asRichPresence() {
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() {
return null;
}
@Nullable
@Override
public Emoji getEmoji() {
return null;
}
};
return null;
}
@NotNull
@ -182,7 +142,7 @@ public class SteamwarDiscordBot {
@NotNull
@Override
public ActivityType getType() {
return ActivityType.DEFAULT;
return null;
}
@Nullable