Class IntentContext
java.lang.Object
com.dianxin.tori.api.utils.quicksetup.IntentContext
A utility class providing quick access to predefined sets of
GatewayIntents.
This is useful for quickly configuring the JDA builder during bot startup.-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull EnumSet<net.dv8tion.jda.api.requests.GatewayIntent> Retrieves anEnumSetcontaining every availableGatewayIntent.static @NotNull EnumSet<net.dv8tion.jda.api.requests.GatewayIntent> Retrieves a standard, commonly used set of defaultGatewayIntents.
-
Method Details
-
getAllIntents
Retrieves anEnumSetcontaining every availableGatewayIntent.Warning: Using all intents requires enabling Privileged Gateway Intents (Presence, Server Members, and Message Content) in your Discord Developer Portal.
- Returns:
- An
EnumSetof all intents.
-
getDefaultIntents
@NotNull public static @NotNull EnumSet<net.dv8tion.jda.api.requests.GatewayIntent> getDefaultIntents()Retrieves a standard, commonly used set of defaultGatewayIntents.This set includes most standard intents along with necessary privileged intents like
GUILD_MEMBERSandMESSAGE_CONTENT. Ensure these are enabled in your Discord Developer Portal.- Returns:
- An
EnumSetcontaining default intents.
-