Class GuildBanEvent

All Implemented Interfaces:
GenericEvent

public class GuildBanEvent extends GenericGuildEvent
Indicates that a User was banned from a Guild.

Can be used to retrieve the user who was banned (if available) and the triggering guild.
Note: This does not directly indicate that a Member is removed from the Guild!

Requirements

This event requires the GUILD_MODERATION intent to be enabled.

See Also:
  • Constructor Details

    • GuildBanEvent

      public GuildBanEvent(@Nonnull JDA api, long responseNumber, @Nonnull Guild guild, @Nonnull User user)
  • Method Details

    • getUser

      @Nonnull public User getUser()
      The banned User
      Returns:
      The banned user