Class: RubyCord::Guild::URLWebhook
- Defined in:
- lib/rubycord/guild/webhook/url_webhook.rb
Instance Attribute Summary collapse
-
#url ⇒ String
readonly
The URL of the webhook.
Attributes inherited from 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 Webhook
#delete, #delete_message, #edit, #edit_message, from_url, #inspect, #post
Constructor Details
#initialize(url, client: nil) ⇒ URLWebhook
Initializes the webhook from URL.
16 17 18 19 20 |
# File 'lib/rubycord/guild/webhook/url_webhook.rb', line 16 def initialize(url, client: nil) @url = url @token = "" @http = RubyCord::Client::HTTP.new(client || RubyCord::Client.new) end |
Instance Attribute Details
#url ⇒ String (readonly)
Returns The URL of the webhook.
8 9 10 |
# File 'lib/rubycord/guild/webhook/url_webhook.rb', line 8 def url @url end |