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.rb, line 3726 def initialize(server, user, reason) @server = server @user = user @reason = reason end
Public Instance Methods
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.rb, line 3734 def remove(reason = nil) @server.unban(user, reason) end