Skip to content

Commit

Permalink
types(DirectoryChannel): ChannelMention toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Dec 10, 2023
1 parent 651ffc2 commit 1f5d71e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2903,6 +2903,7 @@ export class DirectoryChannel extends BaseChannel {
public guild: InviteGuild;
public guildId: Snowflake;
public name: string;
public toString(): ChannelMention;
}

export class StageInstance extends Base {
Expand Down
13 changes: 10 additions & 3 deletions packages/discord.js/typings/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ import {
Emoji,
PartialEmoji,
Awaitable,
DirectoryChannel,
} from '.';
import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd';
import type { ContextMenuCommandBuilder, SlashCommandBuilder } from '@discordjs/builders';
Expand Down Expand Up @@ -2282,16 +2283,22 @@ declare const anyComponentsActionRowComp: ActionRow<ActionRowComponent>;
expectType<ActionRowBuilder>(ActionRowBuilder.from(anyComponentsActionRowData));
expectType<ActionRowBuilder>(ActionRowBuilder.from(anyComponentsActionRowComp));

declare const stageChannel: StageChannel;
declare const partialGroupDMChannel: PartialGroupDMChannel;
declare const stageChannel: StageChannel;
declare const directoryChannel: DirectoryChannel;
declare const mediaChannel: MediaChannel;

expectType<ChannelMention>(textChannel.toString());
expectType<UserMention>(dmChannel.toString());
expectType<ChannelMention>(voiceChannel.toString());
expectType<ChannelMention>(partialGroupDMChannel.toString());
expectType<ChannelMention>(categoryChannel.toString());
expectType<ChannelMention>(newsChannel.toString());
expectType<ChannelMention>(threadChannel.toString());
expectType<ChannelMention>(stageChannel.toString());
expectType<ChannelMention>(partialGroupDMChannel.toString());
expectType<UserMention>(dmChannel.toString());
expectType<ChannelMention>(directoryChannel.toString());
expectType<ChannelMention>(forumChannel.toString());
expectType<ChannelMention>(mediaChannel.toString());
expectType<UserMention>(user.toString());
expectType<UserMention>(guildMember.toString());

Expand Down

0 comments on commit 1f5d71e

Please sign in to comment.