mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
fix: Miscellaneous fixes (#9445)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> Co-authored-by: Almeida <almeidx@pm.me> Co-authored-by: kyranet <kyradiscord@gmail.com> Fix embeds and components (#9437) fix links and invalid syntax (#9322)
This commit is contained in:
@@ -33,10 +33,10 @@ class ChannelManager extends CachedManager {
|
||||
* @name ChannelManager#cache
|
||||
*/
|
||||
|
||||
_add(data, guild, { cache = true, allowUnknownGuild = false, fromInteraction = false } = {}) {
|
||||
_add(data, guild, { cache = true, allowUnknownGuild = false } = {}) {
|
||||
const existing = this.cache.get(data.id);
|
||||
if (existing) {
|
||||
if (cache) existing._patch(data, fromInteraction);
|
||||
if (cache) existing._patch(data);
|
||||
guild?.channels?._add(existing);
|
||||
if (ThreadChannelTypes.includes(existing.type)) {
|
||||
existing.parent?.threads?._add(existing);
|
||||
@@ -44,7 +44,7 @@ class ChannelManager extends CachedManager {
|
||||
return existing;
|
||||
}
|
||||
|
||||
const channel = Channel.create(this.client, data, guild, { allowUnknownGuild, fromInteraction });
|
||||
const channel = Channel.create(this.client, data, guild, { allowUnknownGuild });
|
||||
|
||||
if (!channel) {
|
||||
this.client.emit(Events.DEBUG, `Failed to find guild, or unknown type for channel ${data.id} ${data.type}`);
|
||||
|
||||
Reference in New Issue
Block a user