From 709b138610b11b79ac44f56f80538c2d39e058bb Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Thu, 20 Apr 2023 18:18:01 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=F0=9F=90=9B=20Channel=20cache=20error=20?= =?UTF-8?q?#625?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :skull: --- src/structures/BaseGuildVoiceChannel.js | 9 +++++++++ src/structures/Channel.js | 3 ++- src/util/Options.js | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/structures/BaseGuildVoiceChannel.js b/src/structures/BaseGuildVoiceChannel.js index 5f1b804..e29e9f8 100644 --- a/src/structures/BaseGuildVoiceChannel.js +++ b/src/structures/BaseGuildVoiceChannel.js @@ -3,6 +3,7 @@ const { Collection } = require('@discordjs/collection'); const GuildChannel = require('./GuildChannel'); const TextBasedChannel = require('./interfaces/TextBasedChannel'); +const InteractionManager = require('../managers/InteractionManager'); const MessageManager = require('../managers/MessageManager'); const { VideoQualityModes } = require('../util/Constants'); const Permissions = require('../util/Permissions'); @@ -26,6 +27,14 @@ class BaseGuildVoiceChannel extends GuildChannel { * @type {boolean} */ this.nsfw = Boolean(data.nsfw); + + /** + * A manager of the interactions sent to this channel + * @type {InteractionManager} + */ + this.interactions = new InteractionManager(this); + + this._patch(data); } _patch(data) { diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 77dae59..50dfcef 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -15,7 +15,6 @@ let ForumChannel; const ChannelFlags = require('../util/ChannelFlags'); const { ChannelTypes, ThreadChannelTypes, VoiceBasedChannelTypes } = require('../util/Constants'); const SnowflakeUtil = require('../util/SnowflakeUtil'); -// Const { ApplicationCommand } = require('discord.js-selfbot-v13'); - Not being used in this file, not necessary. /** * @type {WeakSet} @@ -243,9 +242,11 @@ class Channel extends Base { if (!allowUnknownGuild) channel.parent?.threads.cache.set(channel.id, channel); break; } + case ChannelTypes.GUILD_DIRECTORY: channel = new DirectoryChannel(client, data); break; + case ChannelTypes.GUILD_FORUM: channel = new ForumChannel(guild, data, client); break; diff --git a/src/util/Options.js b/src/util/Options.js index 42c13e8..e5a6fe4 100644 --- a/src/util/Options.js +++ b/src/util/Options.js @@ -201,8 +201,8 @@ class Options extends null { os_version: '10.0.22621', os_arch: 'x64', system_locale: 'en-US', - client_build_number: 189005, - native_build_number: 30921, + client_build_number: 190187, + native_build_number: 31718, client_event_source: null, design_id: 0, },