Skip to content

Commit

Permalink
docs: fixed several typings and MessagePayload#create JSDoc (#6059)
Browse files Browse the repository at this point in the history
  • Loading branch information
BannerBomb committed Jul 5, 2021
1 parent ded93fe commit 4c0426c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/structures/MessagePayload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 4c0426c

Please sign in to comment.