Class: Discordrb::Events::InviteDeleteEvent
- Defined in:
- lib/discordrb/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.
56 57 58 59 60 61 |
# File 'lib/discordrb/events/invites.rb', line 56 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.
48 49 50 |
# File 'lib/discordrb/events/invites.rb', line 48 def channel @channel end |
#code ⇒ String (readonly)
Returns The code of the deleted invite.
54 55 56 |
# File 'lib/discordrb/events/invites.rb', line 54 def code @code end |
#server ⇒ Server? (readonly)
Returns The server the deleted invite was for.
51 52 53 |
# File 'lib/discordrb/events/invites.rb', line 51 def server @server end |