Skip to content

Commit

Permalink
feat: use manager's method
Browse files Browse the repository at this point in the history
  • Loading branch information
Syjalo committed Dec 11, 2024
1 parent e6a1554 commit f295423
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
7 changes: 7 additions & 0 deletions packages/discord.js/src/managers/GuildChannelManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ class GuildChannelManager extends CachedManager {
* @typedef {NewsChannel|Snowflake} NewsChannelResolvable
*/

/**
* Represents the followed channel data.
* @typedef {Object} FollowedChannel
* @property {Snowflake} channelId Source channel id
* @property {Snowflake} webhookId Created webhook id in the target channel
*/

/**
* Adds the target channel to a channel's followers.
* @param {NewsChannelResolvable} channel The channel to follow
Expand Down
7 changes: 0 additions & 7 deletions packages/discord.js/src/structures/NewsChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ const BaseGuildTextChannel = require('./BaseGuildTextChannel');
* @extends {BaseGuildTextChannel}
*/
class NewsChannel extends BaseGuildTextChannel {
/**
* Represents the followed channel data.
* @typedef {Object} FollowedChannel
* @property {Snowflake} channelId Source channel id
* @property {Snowflake} webhookId Created webhook id in the target channel
*/

/**
* Adds the target to this channel's followers.
* @param {TextChannelResolvable} channel The channel where the webhook should be created
Expand Down
5 changes: 0 additions & 5 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2535,11 +2535,6 @@ export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extend
public isFromMessage(): this is ModalMessageModalSubmitInteraction<Cached>;
}

export interface FollowedChannel {
channelId: Snowflake;
webhookId: Snowflake;
}

export class NewsChannel extends BaseGuildTextChannel {
public threads: GuildTextThreadManager<AllowedThreadTypeForNewsChannel>;
public type: ChannelType.GuildAnnouncement;
Expand Down

0 comments on commit f295423

Please sign in to comment.