mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
docs: fixed several typings and MessagePayload#create JSDoc (#6059)
This commit is contained in:
@@ -251,7 +251,7 @@ class MessagePayload {
|
||||
* @param {MessageTarget} target Target to send to
|
||||
* @param {string|MessageOptions|WebhookMessageOptions} options Options or content to use
|
||||
* @param {MessageOptions|WebhookMessageOptions} [extra={}] - Extra options to add onto specified options
|
||||
* @returns {MessageOptions|WebhookMessageOptions}
|
||||
* @returns {MessagePayload}
|
||||
*/
|
||||
static create(target, options, extra = {}) {
|
||||
return new this(
|
||||
|
||||
10
typings/index.d.ts
vendored
10
typings/index.d.ts
vendored
@@ -105,7 +105,7 @@ export abstract class AnonymousGuild extends BaseGuild {
|
||||
public splashURL(options?: StaticImageURLOptions): string | null;
|
||||
}
|
||||
|
||||
export abstract class Application {
|
||||
export abstract class Application extends Base {
|
||||
public constructor(client: Client, data: unknown);
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
@@ -220,7 +220,7 @@ export class BaseGuildVoiceChannel extends GuildChannel {
|
||||
export class BaseMessageComponent {
|
||||
public constructor(data?: BaseMessageComponent | BaseMessageComponentOptions);
|
||||
public type: MessageComponentType | null;
|
||||
private static create(data: MessageComponentOptions): MessageComponent;
|
||||
private static create(data: MessageComponentOptions, client?: Client | WebhookClient, skipValidation?: boolean): MessageComponent | undefined;
|
||||
private static resolveType(type: MessageComponentTypeResolvable): MessageComponentType;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ export class Channel extends Base {
|
||||
public deleted: boolean;
|
||||
public id: Snowflake;
|
||||
public type: keyof typeof ChannelType;
|
||||
public delete(reason?: string): Promise<Channel>;
|
||||
public delete(): Promise<Channel>;
|
||||
public fetch(force?: boolean): Promise<Channel>;
|
||||
public isText(): this is TextChannel | DMChannel | NewsChannel | ThreadChannel;
|
||||
public isThread(): this is ThreadChannel;
|
||||
@@ -294,7 +294,7 @@ export class Client extends BaseClient {
|
||||
public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
|
||||
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
|
||||
public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
|
||||
public fetchWidget(id: Snowflake): Promise<Widget>;
|
||||
public fetchWidget(guild: GuildResolvable): Promise<Widget>;
|
||||
public generateInvite(options?: InviteGenerationOptions): string;
|
||||
public login(token?: string): Promise<string>;
|
||||
public sweepMessages(lifetime?: number): number;
|
||||
@@ -427,7 +427,7 @@ export class DataResolver extends null {
|
||||
public static resolveCode(data: string, regx: RegExp): string;
|
||||
public static resolveFile(resource: BufferResolvable | Stream): Promise<Buffer | Stream>;
|
||||
public static resolveFileAsBuffer(resource: BufferResolvable | Stream): Promise<Buffer>;
|
||||
public static resolveImage(resource: BufferResolvable | Base64Resolvable): Promise<string>;
|
||||
public static resolveImage(resource: BufferResolvable | Base64Resolvable): Promise<string | null>;
|
||||
public static resolveInviteCode(data: InviteResolvable): string;
|
||||
public static resolveGuildTemplateCode(data: GuildTemplateResolvable): string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user