diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index eeef3f337..2bb8cd469 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2888,6 +2888,7 @@ export class DirectoryChannel extends BaseChannel { public guild: InviteGuild; public guildId: Snowflake; public name: string; + public toString(): ChannelMention; } export class StageInstance extends Base { diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index 4e9f064ab..44b53da81 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -186,6 +186,8 @@ import { Emoji, PartialEmoji, Awaitable, + Channel, + DirectoryChannel, } from '.'; import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd'; import type { ContextMenuCommandBuilder, SlashCommandBuilder } from '@discordjs/builders'; @@ -2282,16 +2284,12 @@ declare const anyComponentsActionRowComp: ActionRow; expectType(ActionRowBuilder.from(anyComponentsActionRowData)); expectType(ActionRowBuilder.from(anyComponentsActionRowComp)); -declare const stageChannel: StageChannel; -declare const partialGroupDMChannel: PartialGroupDMChannel; +type UserMentionChannels = DMChannel | PartialDMChannel; +declare const channelMentionChannels: Exclude; +declare const userMentionChannels: UserMentionChannels; -expectType(textChannel.toString()); -expectType(voiceChannel.toString()); -expectType(newsChannel.toString()); -expectType(threadChannel.toString()); -expectType(stageChannel.toString()); -expectType(partialGroupDMChannel.toString()); -expectType(dmChannel.toString()); +expectType(channelMentionChannels.toString()); +expectType(userMentionChannels.toString()); expectType(user.toString()); expectType(guildMember.toString()); @@ -2313,7 +2311,9 @@ expectType>(interactionWebhook.send('content')); expectType>(interactionWebhook.editMessage(snowflake, 'content')); expectType>(interactionWebhook.fetchMessage(snowflake)); +declare const partialGroupDMChannel: PartialGroupDMChannel; declare const categoryChannel: CategoryChannel; +declare const stageChannel: StageChannel; declare const forumChannel: ForumChannel; await forumChannel.edit({