From 55ba6b2f81cc118fa27122f57e836a8bdceef4da Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Sun, 10 Dec 2023 14:58:59 +0000 Subject: [PATCH] types(DirectoryChannel): `ChannelMention` `toString()` --- packages/discord.js/typings/index.d.ts | 1 + packages/discord.js/typings/index.test-d.ts | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index eeef3f337d75..2bb8cd4699fe 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 4e9f064ab957..08dc9b7cd6a6 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -186,6 +186,7 @@ import { Emoji, PartialEmoji, Awaitable, + DirectoryChannel, } from '.'; import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd'; import type { ContextMenuCommandBuilder, SlashCommandBuilder } from '@discordjs/builders'; @@ -2282,16 +2283,22 @@ declare const anyComponentsActionRowComp: ActionRow; expectType(ActionRowBuilder.from(anyComponentsActionRowData)); expectType(ActionRowBuilder.from(anyComponentsActionRowComp)); -declare const stageChannel: StageChannel; declare const partialGroupDMChannel: PartialGroupDMChannel; +declare const stageChannel: StageChannel; +declare const directoryChannel: DirectoryChannel; +declare const mediaChannel: MediaChannel; expectType(textChannel.toString()); +expectType(dmChannel.toString()); expectType(voiceChannel.toString()); +expectType(partialGroupDMChannel.toString()); +expectType(categoryChannel.toString()); expectType(newsChannel.toString()); expectType(threadChannel.toString()); expectType(stageChannel.toString()); -expectType(partialGroupDMChannel.toString()); -expectType(dmChannel.toString()); +expectType(directoryChannel.toString()); +expectType(forumChannel.toString()); +expectType(mediaChannel.toString()); expectType(user.toString()); expectType(guildMember.toString());