Class 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 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 an ApplicationCommandGuildPermissions with an associated GatewayDiscordClient and Discord data.
        Parameters:
        gateway - The GatewayDiscordClient 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.