Skip to content

Commit

Permalink
types: revamp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Jan 18, 2025
1 parent 0db4db1 commit d0259b9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/discord.js/typings/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2457,14 +2457,13 @@ declare const forumChannel: ForumChannel;
declare const mediaChannel: MediaChannel;
declare const threadOnlyChannel: ThreadOnlyChannel;

// @ts-expect-error
forumChannel.messages;

// @ts-expect-error
mediaChannel.messages;
// Threads have messages.
expectType<GuildMessageManager>(threadChannel.messages);

// @ts-expect-error
threadOnlyChannel.messages;
// Thread-only channels have threads—not messages.
notPropertyOf(forumChannel, 'messages');
notPropertyOf(mediaChannel, 'messages');
notPropertyOf(threadOnlyChannel, 'messages');

await forumChannel.edit({
availableTags: [...forumChannel.availableTags, { name: 'tag' }],
Expand Down

0 comments on commit d0259b9

Please sign in to comment.