Skip to content

Commit

Permalink
feat(Widget): Allow forum channels (#8645)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Sep 21, 2022
1 parent 6f1f465 commit b106956
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions packages/discord.js/src/structures/Guild.js
Expand Up @@ -493,7 +493,7 @@ class Guild extends AnonymousGuild {

/**
* Widget channel for this guild
* @type {?(TextChannel|NewsChannel|VoiceChannel|StageChannel)}
* @type {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel)}
* @readonly
*/
get widgetChannel() {
Expand Down Expand Up @@ -660,14 +660,15 @@ class Guild extends AnonymousGuild {
* Data for the Guild Widget Settings object
* @typedef {Object} GuildWidgetSettings
* @property {boolean} enabled Whether the widget is enabled
* @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel)} channel The widget invite channel
* @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel)} channel The widget invite channel
*/

/**
* The Guild Widget Settings object
* @typedef {Object} GuildWidgetSettingsData
* @property {boolean} enabled Whether the widget is enabled
* @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|Snowflake)} channel The widget invite channel
* @property {?(TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel|Snowflake)} channel
* The widget invite channel
*/

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/discord.js/typings/index.d.ts
Expand Up @@ -1122,7 +1122,7 @@ export class Guild extends AnonymousGuild {
public vanityURLUses: number | null;
public get voiceAdapterCreator(): InternalDiscordGatewayAdapterCreator;
public voiceStates: VoiceStateManager;
public get widgetChannel(): TextChannel | NewsChannel | VoiceBasedChannel | null;
public get widgetChannel(): TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | null;
public widgetChannelId: Snowflake | null;
public widgetEnabled: boolean | null;
public get maximumBitrate(): number;
Expand Down Expand Up @@ -4926,7 +4926,7 @@ export interface GuildCreateOptions {

export interface GuildWidgetSettings {
enabled: boolean;
channel: TextChannel | NewsChannel | VoiceBasedChannel | null;
channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | null;
}

export interface GuildEditData {
Expand Down Expand Up @@ -5004,7 +5004,7 @@ export interface GuildPruneMembersOptions {

export interface GuildWidgetSettingsData {
enabled: boolean;
channel: TextChannel | NewsChannel | VoiceBasedChannel | Snowflake | null;
channel: TextChannel | NewsChannel | VoiceBasedChannel | ForumChannel | Snowflake | null;
}

export interface GuildSearchMembersOptions {
Expand Down

0 comments on commit b106956

Please sign in to comment.