detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
48 lines (47 loc) • 1.94 kB
TypeScript
import { RequestTypes } from 'detritus-client-rest';
import { ShardClient } from '../client';
import { BaseSet } from '../collections/baseset';
import { WebhookTypes } from '../constants';
import { UrlQuery } from '../utils';
import { BaseStructure, BaseStructureData } from './basestructure';
import { Channel } from './channel';
import { BaseGuild, Guild } from './guild';
import { User } from './user';
/**
* Webhook Structure
* @category Structure
*/
export declare class Webhook extends BaseStructure {
readonly _keys: BaseSet<string>;
applicationId: null | string;
avatar: null | string;
channelId: string;
discriminator: string;
guildId: string;
id: string;
name: string;
sourceChannel?: Channel;
sourceGuild?: BaseGuild;
token?: null | string;
type: WebhookTypes;
user?: null | User;
constructor(client: ShardClient, data?: BaseStructureData, isClone?: boolean);
get avatarUrl(): string;
get channel(): Channel | null;
get createdAt(): Date;
get createdAtUnix(): number;
get defaultAvatarUrl(): string;
get guild(): Guild | null;
get jumpLink(): string;
get mention(): string;
avatarUrlFormat(format?: string, query?: UrlQuery): string;
createMessage(options: RequestTypes.ExecuteWebhook, compatibleType?: string): Promise<import("./message").Message | null>;
delete(options?: RequestTypes.DeleteWebhook): Promise<any>;
deleteMessage(messageId: string): Promise<any>;
edit(options?: RequestTypes.EditWebhook): Promise<Webhook>;
editMessage(messageId: string, options?: RequestTypes.EditWebhookTokenMessage): Promise<import("./message").Message>;
execute(options: RequestTypes.ExecuteWebhook, compatibleType?: string): Promise<import("./message").Message | null>;
fetchMessage(messageId: string): Promise<import("./message").Message>;
mergeValue(key: string, value: any): void;
toString(): string;
}