-
-
Notifications
You must be signed in to change notification settings - Fork 113
/
webhook.ts
33 lines (30 loc) · 910 Bytes
/
webhook.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Types extracted from https://discord.com/developers/docs/resources/webhook
*/
import type { APIPartialChannel } from './channel.ts';
import type { APIPartialGuild } from './guild.ts';
import type { APIUser } from './user.ts';
/**
* https://discord.com/developers/docs/resources/webhook#webhook-object
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIWebhook {
id: string;
type: WebhookType;
guild_id?: string;
channel_id: string;
user?: APIUser;
name: string | null;
avatar: string | null;
token?: string;
source_guild?: APIPartialGuild;
source_channel?: APIPartialChannel;
application_id: string | null;
}
/**
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export enum WebhookType {
Incoming = 1,
ChannelFollower,
}