Class: Rubycord::Events::WebhookUpdateEvent
- Defined in:
- lib/rubycord/events/webhooks.rb
Overview
Event raised when a webhook is updated
Instance Attribute Summary collapse
-
#channel ⇒ Channel
readonly
The channel the webhook is associated to.
-
#server ⇒ Server
readonly
The server where the webhook updated.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(data, bot) ⇒ WebhookUpdateEvent
constructor
A new instance of WebhookUpdateEvent.
Constructor Details
#initialize(data, bot) ⇒ WebhookUpdateEvent
Returns a new instance of WebhookUpdateEvent.
13 14 15 16 17 18 |
# File 'lib/rubycord/events/webhooks.rb', line 13 def initialize(data, bot) @bot = bot @server = bot.server(data["guild_id"].to_i) @channel = bot.channel(data["channel_id"].to_i) end |
Instance Attribute Details
#channel ⇒ Channel (readonly)
Returns the channel the webhook is associated to.
11 12 13 |
# File 'lib/rubycord/events/webhooks.rb', line 11 def channel @channel end |
#server ⇒ Server (readonly)
Returns the server where the webhook updated.
8 9 10 |
# File 'lib/rubycord/events/webhooks.rb', line 8 def server @server end |