class Discordrb::ServerBan

A ban entry on a server

Attributes

reason[R]

@return [String, nil] the reason the user was banned, if provided

server[R]

@return [Server] the server this ban belongs to

user[R]

@return [User] the user that was banned

Public Class Methods

new(server, user, reason) click to toggle source

@!visibility private

# File lib/discordrb/data/server.rb, line 989
def initialize(server, user, reason)
  @server = server
  @user = user
  @reason = reason
end

Public Instance Methods

lift(reason = nil)
Alias for: remove
remove(reason = nil) click to toggle source

Removes this ban on the associated user in the server @param reason [String] the reason for removing the ban

# File lib/discordrb/data/server.rb, line 997
def remove(reason = nil)
  @server.unban(user, reason)
end
Also aliased as: unban, lift
unban(reason = nil)
Alias for: remove