Class RoleDeleteEvent


public class RoleDeleteEvent extends RoleEvent
Dispatched when a role is deleted in a guild.

The deleted role may not be present if roles are not stored.

This event is dispatched by Discord.

See Also:
  • Constructor Details

  • Method Details

    • getGuildId

      public Snowflake getGuildId()
      Gets the Snowflake ID of the Guild the Role was deleted in.
      Returns:
      The ID of the Guild involved.
    • getGuild

      public Mono<Guild> getGuild()
      Requests to retrieve the Guild the Role was deleted in.
      Returns:
      A Mono where, upon successful completion, emits the Guild containing the deleted Role. If an error is received, it is emitted through the Mono.
    • getRoleId

      public Snowflake getRoleId()
      Gets the Snowflake ID of the Role that was deleted in this event.
      Returns:
      The ID of the deleted Role.
    • getRole

      public Optional<Role> getRole()
      Gets the Role that was deleted in this event, if present. This may not be available if Roles are not stored.
      Returns:
      The Role that was deleted in this event, if present.
    • toString

      public String toString()
      Overrides:
      toString in class Object