Class: Discordrb::Events::WebhookUpdateEvent
- Defined in:
- lib/discordrb/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.
15 16 17 18 19 20 |
# File 'lib/discordrb/events/webhooks.rb', line 15 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.
13 14 15 |
# File 'lib/discordrb/events/webhooks.rb', line 13 def channel @channel end |
#server ⇒ Server (readonly)
Returns the server where the webhook updated.
10 11 12 |
# File 'lib/discordrb/events/webhooks.rb', line 10 def server @server end |