Class: DiscordRDA::GuildRoleCreateEvent
- Defined in:
- lib/discord_rda/event/base.rb
Overview
Role events
Instance Attribute Summary
Attributes inherited from Event
#data, #shard_id, #timestamp, #type
Instance Method Summary collapse
- #guild_id ⇒ Object
-
#initialize(data, shard_id:) ⇒ GuildRoleCreateEvent
constructor
A new instance of GuildRoleCreateEvent.
- #role ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(data, shard_id:) ⇒ GuildRoleCreateEvent
Returns a new instance of GuildRoleCreateEvent.
413 414 415 |
# File 'lib/discord_rda/event/base.rb', line 413 def initialize(data, shard_id:) super('GUILD_ROLE_CREATE', data, shard_id: shard_id) end |
Instance Method Details
#guild_id ⇒ Object
421 422 423 |
# File 'lib/discord_rda/event/base.rb', line 421 def guild_id @data['guild_id'] end |
#role ⇒ Object
417 418 419 |
# File 'lib/discord_rda/event/base.rb', line 417 def role @role ||= Role.new(@data['role'].merge('guild_id' => @data['guild_id'])) end |