Class: Discordrb::Events::GuildEvent
- Inherits:
-
Object
- Object
- Discordrb::Events::GuildEvent
- Defined in:
- lib/discordrb/events/guilds.rb
Overview
Generic subclass for server events (create/update/delete)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
- #init_server(data, bot) ⇒ Object
-
#initialize(data, bot) ⇒ GuildEvent
constructor
A new instance of GuildEvent.
Constructor Details
#initialize(data, bot) ⇒ GuildEvent
Returns a new instance of GuildEvent.
9 10 11 |
# File 'lib/discordrb/events/guilds.rb', line 9 def initialize(data, bot) init_server(data, bot) end |
Instance Attribute Details
#server ⇒ Object (readonly)
Returns the value of attribute server.
7 8 9 |
# File 'lib/discordrb/events/guilds.rb', line 7 def server @server end |
Instance Method Details
#init_server(data, bot) ⇒ Object
13 14 15 |
# File 'lib/discordrb/events/guilds.rb', line 13 def init_server(data, bot) @server = bot.server(data['id'].to_i) end |