Package discord4j.core.object.command
Class ApplicationCommandGuildPermissions
- java.lang.Object
-
- discord4j.core.object.command.ApplicationCommandGuildPermissions
-
- All Implemented Interfaces:
DiscordObject
public class ApplicationCommandGuildPermissions extends Object implements DiscordObject
Represents a guild application command permissions. Includes information about the command, the application, the guild and a list of all permissions created for the command in the guild.- See Also:
- Application Command Permissions
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_PERMISSION_ENTRIES
The maximum amount of permission overrides for this command.
-
Constructor Summary
Constructors Constructor Description ApplicationCommandGuildPermissions(GatewayDiscordClient gateway, discord4j.discordjson.json.GuildApplicationCommandPermissionsData data)
Constructs anApplicationCommandGuildPermissions
with an associatedGatewayDiscordClient
and Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Snowflake
getApplicationId()
Returns the ID of the application the command belongs to.GatewayDiscordClient
getClient()
Returns theGatewayDiscordClient
that created this object.Snowflake
getGuildId()
Returns the id of the guild.Snowflake
getId()
Returns the ID of the command or the application ID.List<ApplicationCommandPermission>
getPermissions()
Returns the permissions for the command in the guild.String
toString()
-
-
-
Field Detail
-
MAX_PERMISSION_ENTRIES
public static final int MAX_PERMISSION_ENTRIES
The maximum amount of permission overrides for this command.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ApplicationCommandGuildPermissions
public ApplicationCommandGuildPermissions(GatewayDiscordClient gateway, discord4j.discordjson.json.GuildApplicationCommandPermissionsData data)
Constructs anApplicationCommandGuildPermissions
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.
-
-
Method Detail
-
getId
public Snowflake getId()
Returns the ID of the command or the application ID.- Returns:
- the ID of the command or the application ID
-
getGuildId
public Snowflake getGuildId()
Returns the id of the guild.- Returns:
- the id of the guild
-
getApplicationId
public Snowflake getApplicationId()
Returns the ID of the application the command belongs to.- Returns:
- the ID of the application the command belongs to
-
getPermissions
public List<ApplicationCommandPermission> getPermissions()
Returns the permissions for the command in the guild.- Returns:
- the permissions for the command in the guild.
-
getClient
public GatewayDiscordClient getClient()
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
-