SteamWar/BungeeCore
Archiviert
13
2

Add SteamwarDiscordBot presence

Dieser Commit ist enthalten in:
yoyosource 2021-07-28 16:04:21 +02:00
Ursprung b6f9a5a60d
Commit da13f8d546

Datei anzeigen

@ -34,6 +34,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.EntityBuilder;
import net.dv8tion.jda.internal.entities.SelfUserImpl;
import net.md_5.bungee.api.ProxyServer;
import org.jetbrains.annotations.NotNull;
@ -195,7 +196,8 @@ public class SteamwarDiscordBot {
}
break;
case 1:
jda.getPresence().setActivity(Activity.of(Activity.ActivityType.CUSTOM_STATUS, "Online: " + BungeeCore.get().getProxy().getOnlineCount()));
Activity activity = EntityBuilder.createActivity("Online: " + BungeeCore.get().getProxy().getOnlineCount(), null, Activity.ActivityType.CUSTOM_STATUS);
jda.getPresence().setActivity(activity);
index = 0;
return;
}