Class BanEvent


public class BanEvent extends GuildEvent
Dispatched when a user is banned from a guild.

This event is dispatched by Discord.

See Also:
  • Constructor Details

  • Method Details

    • getUser

      public User getUser()
      Gets the User that has been banned from the Guild.
      Returns:
      The User that has been banned.
    • getGuildId

      public Snowflake getGuildId()
      Gets the Snowflake ID of the Guild in this event.
      Returns:
      The ID of the Guild.
    • getGuild

      public Mono<Guild> getGuild()
      Requests to retrieve the Guild the User was banned from.
      Returns:
      A Mono where, upon successful completion, emits the Guild involved in this event. If an error is received, it is emitted through the Mono.
    • toString

      public String toString()
      Overrides:
      toString in class Object