Class: Discordrb::Events::ServerDeleteEvent
- Inherits:
-
ServerEvent
- Object
- Event
- ServerEvent
- Discordrb::Events::ServerDeleteEvent
- Defined in:
- lib/discordrb/events/guilds.rb
Overview
Server is deleted, the server was left because the bot was kicked, or the bot made itself leave the server.
Instance Attribute Summary collapse
-
#server ⇒ Integer
readonly
The ID of the server that was left.
Attributes inherited from Event
Instance Method Summary collapse
-
#init_server(data, _bot) ⇒ Object
Override init_server to account for the deleted server.
Methods inherited from ServerEvent
Constructor Details
This class inherits a constructor from Discordrb::Events::ServerEvent
Instance Attribute Details
#server ⇒ Integer (readonly)
Returns The ID of the server that was left.
65 66 67 |
# File 'lib/discordrb/events/guilds.rb', line 65 def server @server end |
Instance Method Details
#init_server(data, _bot) ⇒ Object
Override init_server to account for the deleted server
68 69 70 |
# File 'lib/discordrb/events/guilds.rb', line 68 def init_server(data, _bot) @server = data['id'].to_i end |