Class: Rubycord::Events::InviteDeleteEvent
- Defined in:
- lib/rubycord/events/invites.rb
Overview
Raised when an invite is deleted.
Instance Attribute Summary collapse
-
#channel ⇒ Channel
readonly
The channel the deleted invite was for.
-
#code ⇒ String
readonly
The code of the deleted invite.
-
#server ⇒ Server?
readonly
The server the deleted invite was for.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(data, bot) ⇒ InviteDeleteEvent
constructor
A new instance of InviteDeleteEvent.
Constructor Details
#initialize(data, bot) ⇒ InviteDeleteEvent
Returns a new instance of InviteDeleteEvent.
54 55 56 57 58 59 |
# File 'lib/rubycord/events/invites.rb', line 54 def initialize(data, bot) @bot = bot @channel = bot.channel(data["channel_id"]) @server = bot.server(data["guild_id"]) if data["guild_id"] @code = data["code"] end |
Instance Attribute Details
#channel ⇒ Channel (readonly)
Returns The channel the deleted invite was for.
46 47 48 |
# File 'lib/rubycord/events/invites.rb', line 46 def channel @channel end |
#code ⇒ String (readonly)
Returns The code of the deleted invite.
52 53 54 |
# File 'lib/rubycord/events/invites.rb', line 52 def code @code end |
#server ⇒ Server? (readonly)
Returns The server the deleted invite was for.
49 50 51 |
# File 'lib/rubycord/events/invites.rb', line 49 def server @server end |