Represents a new webhook
| Name | Type | Default | Description |
|---|---|---|---|
url |
URL |
Webhook-URL |
|
username |
String | null |
Username of the webhook |
avatarUrl |
URL | null |
URL to a avatar |
Methods
-
Deletes this message
Returns:
Type Description Promise -
Edits this webhook object
Name Type Default Description nameString null New username of the webhook
base64AvatarString null Base64-String of your image. If you don't know how to use this, please google Image to Base64 nodejs or File to Base 64 if you have an image file.
Returns:
Type Description Promise.<void> -
fetchMessage (id)Promise.<Message> async
-
Fetches a message by ID (including content)
Name Type Description idString ID of the message
Returns:
Type Description Promise.<Message> Message -
resolveMessageID (messageID)Message
-
Resolves a message by ID (will not include any content of this message. Only use this if you want to edit or delate already send messages without having to fetch the message again
Name Type Description messageIDReturns:
Type Description Message -
send (content, embeds, allowedMentions, tts, components)Promise.<Message> async
-
Creates a new message as the webhook
Name Type Default Description contentString Content of this message
embedsArray.<Object> Array of Embed-Objects
allowedMentionsObject ttsBoolean false If enabled, discord will read out the messages to everyone who hase this channel open
componentsArray Message-Component-Object. ⚠ This will only work, if your webhook is owned by an application.
Returns:
Type Description Promise.<Message> New message