mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
feat(Webhook): backport missing properties (#3710)
* feat(Webhook): add avatarURL getter This backports: https://github.com/discordjs/discord.js/pull/3625 * feat(Webhook): add type, createAt, and createdTimestamp This backports: https://github.com/discordjs/discord.js/pull/3585 * feat(Webhook): add url getter This backports: https://github.com/discordjs/discord.js/pull/3178 * docs(Webhook): add missing type and readonly tags
This commit is contained in:
10
typings/index.d.ts
vendored
10
typings/index.d.ts
vendored
@@ -1578,14 +1578,17 @@ declare module 'discord.js' {
|
||||
|
||||
export class Webhook {
|
||||
constructor(client: Client, dataOrID: object | string, token: string);
|
||||
public avatar: string;
|
||||
public avatar: string | null;
|
||||
public readonly avatarURL: string | null;
|
||||
public channelID: string;
|
||||
public readonly client: Client;
|
||||
public guildID: string;
|
||||
public id: Snowflake;
|
||||
public name: string;
|
||||
public owner: User | object;
|
||||
public token: string;
|
||||
public token: string | null;
|
||||
public type: WebhookTypes;
|
||||
public readonly url: string;
|
||||
public delete(reason?: string): Promise<void>;
|
||||
public edit(name?: string, avatar?: BufferResolvable): Promise<Webhook>;
|
||||
public edit(options?: WebhookEditOptions, reason?: string): Promise<Webhook>;
|
||||
@@ -1604,6 +1607,7 @@ declare module 'discord.js' {
|
||||
private _timeouts: Set<NodeJS.Timer>;
|
||||
private resolver: ClientDataResolver;
|
||||
private rest: object;
|
||||
public token: string;
|
||||
|
||||
public options: ClientOptions;
|
||||
public clearInterval(interval: NodeJS.Timer): void;
|
||||
@@ -2230,6 +2234,8 @@ declare module 'discord.js' {
|
||||
split?: boolean | SplitOptions;
|
||||
};
|
||||
|
||||
type WebhookTypes = 'Incoming' | 'Channel Follower';
|
||||
|
||||
type WebSocketOptions = {
|
||||
large_threshold?: number;
|
||||
compress?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user