mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: add typeguards to webhooks (#6850)
This commit is contained in:
@@ -395,6 +395,22 @@ class Webhook {
|
||||
return this.client.rest.cdn.Avatar(this.id, this.avatar, format, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not this webhook is a channel follower webhook.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isChannelFollower() {
|
||||
return this.type === WebhookTypes['Channel Follower'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not this webhook is an incoming webhook.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isIncoming() {
|
||||
return this.type === WebhookTypes.Incoming;
|
||||
}
|
||||
|
||||
static applyToClass(structure, ignore = []) {
|
||||
for (const prop of [
|
||||
'send',
|
||||
|
||||
Reference in New Issue
Block a user