Class: Discorb::Webhook::URLWebhook

Inherits:
Discorb::Webhook show all
Defined in:
lib/discorb/webhook.rb

Overview

Represents a webhook from URL.

Instance Attribute Summary collapse

Attributes inherited from Discorb::Webhook

#application_id, #avatar, #channel_id, #guild_id, #name, #token, #user

Instance Method Summary collapse

Methods inherited from Discorb::Webhook

#delete!, #delete_message!, #edit, #edit_message, from_url, #inspect, new, #post

Constructor Details

#initialize(url) -> URLWebhook

Initializes the webhook from URL.

Parameters:

  • url (String)

    The URL of the webhook.



211
212
213
214
215
# File 'lib/discorb/webhook.rb', line 211

def initialize(url)
  @url = url
  @token = ""
  @http = Discorb::HTTP.new(self)
end

Instance Attribute Details

#url -> String (readonly)

Returns The URL of the webhook.

Returns:

  • (String)

    The URL of the webhook.



204
205
206
# File 'lib/discorb/webhook.rb', line 204

def url
  @url
end