fix: not checking for guild when creating a channel

This commit is contained in:
Amish Shah
2019-04-27 13:39:23 +01:00
parent 4d7fc036a1
commit e0cfb7fb36

View File

@@ -55,7 +55,7 @@ class ChannelStore extends DataStore {
add(data, guild, cache = true) {
const existing = this.get(data.id);
if (existing && existing._patch && cache) existing._patch(data);
if (existing) {
if (existing && guild) {
guild.channels.add(existing);
return existing;
}