$webhook
A `Compact Function` pertaining to information on a webhook with `10` options to choose from.

FUNCTION USAGE

  • $webhook[hookURL;option]

Properties:

hookURL - Define an existing webhookURL. option - Define an option to get webhook data from.

Options:

  1. 1.
    avatar
  2. 2.
    channelid
  3. 3.
    created
  4. 4.
    exists
  5. 5.
    guild
  6. 6.
    id
  7. 7.
    name
  8. 8.
    token
  9. 9.
    type
  10. 10.
    url
undefined is returned when the option data cannot be fetched
avatar
channelid
created
exists
guild
id
name
token
type
url

Returns the avatar URL of the webhook.

Returns the channel ID where the webhook is attached to.

Returns the date/time the webhook was created.

Returns true if the webhook exists. Otherwise, bot returns false.

Returns the guild ID of where the webhook is attached to.

Returns the webhook ID.

Returns the webhook name.

Returns the webhook token. (KEEP THIS SECRET!)

Returns the type of webhook.

  1. 1.
    Incoming
  2. 2.
    Channel Follower

Returns the webhookURL.

Example 1: Fetching webhook data by manually supplying the hookURL and the option in the command.
1
bot.Command({
2
name: "hook",
3
code: `
4
$webhook[$message[1];$message[2]]
5
`
6
})
Copied!
Example 2: Fetching webhook data by supplying the hookURL via variable and a manual option.
1
bot.Command({
2
name: "hook",
3
code: `
4
$webhook[$getChannelVar[webhook];$message[1]]
5
`
6
})
Copied!
Last modified 4mo ago
Copy link