class Discordrb::Events::UserBanEvent

Raised when a user is banned

Attributes

server[R]

@return [Server] the server from which the user was banned

user[R]

@return [User] the user that was banned

Public Class Methods

new(data, bot) click to toggle source

@!visibility private

# File lib/discordrb/events/bans.rb, line 15
def initialize(data, bot)
  @user = bot.user(data['user']['id'].to_i)
  @server = bot.server(data['guild_id'].to_i)
  @bot = bot
end