geforkt von SteamWar/BungeeCore
Add SteamwarDiscordBot presence
Dieser Commit ist enthalten in:
Ursprung
b6f9a5a60d
Commit
da13f8d546
@ -34,6 +34,7 @@ import net.dv8tion.jda.api.entities.Activity;
|
|||||||
import net.dv8tion.jda.api.entities.ActivityFlag;
|
import net.dv8tion.jda.api.entities.ActivityFlag;
|
||||||
import net.dv8tion.jda.api.entities.RichPresence;
|
import net.dv8tion.jda.api.entities.RichPresence;
|
||||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
||||||
|
import net.dv8tion.jda.internal.entities.EntityBuilder;
|
||||||
import net.dv8tion.jda.internal.entities.SelfUserImpl;
|
import net.dv8tion.jda.internal.entities.SelfUserImpl;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
import net.md_5.bungee.api.ProxyServer;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -195,7 +196,8 @@ public class SteamwarDiscordBot {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
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;
|
index = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren