mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
fix: not checking for guild when creating a channel
This commit is contained in:
@@ -55,7 +55,7 @@ class ChannelStore extends DataStore {
|
|||||||
add(data, guild, cache = true) {
|
add(data, guild, cache = true) {
|
||||||
const existing = this.get(data.id);
|
const existing = this.get(data.id);
|
||||||
if (existing && existing._patch && cache) existing._patch(data);
|
if (existing && existing._patch && cache) existing._patch(data);
|
||||||
if (existing) {
|
if (existing && guild) {
|
||||||
guild.channels.add(existing);
|
guild.channels.add(existing);
|
||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user