Class: Discorb::Webhook::URLWebhook
- Inherits:
-
Discorb::Webhook
- Object
- Discorb::Webhook
- Discorb::Webhook::URLWebhook
- Defined in:
- lib/discorb/webhook.rb
Overview
Represents a webhook from URL.
Instance Attribute Summary collapse
-
#url -> String
readonly
The URL of the webhook.
Attributes inherited from Discorb::Webhook
#application_id, #avatar, #channel_id, #guild_id, #name, #token, #user
Instance Method Summary collapse
-
#initialize(url, client: nil) -> URLWebhook
constructor
Initializes the webhook from URL.
Methods inherited from Discorb::Webhook
#delete, #delete_message, #edit, #edit_message, from_url, #inspect, new, #post
Constructor Details
#initialize(url, client: nil) -> URLWebhook
Initializes the webhook from URL.
219 220 221 222 223 |
# File 'lib/discorb/webhook.rb', line 219 def initialize(url, client: nil) @url = url @token = "" @http = Discorb::HTTP.new(client || Discorb::Client.new) end |
Instance Attribute Details
#url -> String (readonly)
Returns The URL of the webhook.
211 212 213 |
# File 'lib/discorb/webhook.rb', line 211 def url @url end |