class Discordrb::AuditLogs::RoleChange
A change that includes roles.
Attributes
type[R]
@return [Symbol] what type of change this is: (:add, :remove)
Public Class Methods
new(data, server)
click to toggle source
@!visibility private
# File lib/discordrb/data/audit_logs.rb, line 263 def initialize(data, server) @type = data['key'].delete('$').to_sym @role_id = data['new_value'][0]['id'].to_i @server = server end
Public Instance Methods
role()
click to toggle source
@return [Role] the role being used.
# File lib/discordrb/data/audit_logs.rb, line 270 def role @role ||= @server.role(@role_id) end