mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
feat(Webhook): add url getter (#3178)
* add Webhook#url * set typing as readonly * suggested change * another one
This commit is contained in:
@@ -213,6 +213,15 @@ class Webhook {
|
||||
return this.client.api.webhooks(this.id, this.token).delete({ reason });
|
||||
}
|
||||
|
||||
/**
|
||||
* The url of this webhook
|
||||
* @type {string}
|
||||
* @readonly
|
||||
*/
|
||||
get url() {
|
||||
return this.client.options.http.api + this.client.api.webhooks(this.id, this.token);
|
||||
}
|
||||
|
||||
static applyToClass(structure) {
|
||||
for (const prop of [
|
||||
'send',
|
||||
|
||||
Reference in New Issue
Block a user