fix(DMChannel): messages not being cached (#2122)

This commit is contained in:
Isabella 2017-11-21 02:43:53 -06:00 committed by Crawl
parent cce2480bb5
commit 22da595b50

View file

@ -69,9 +69,10 @@ class ClientDataManager {
} }
} }
if (channel) { if (channel && !already) {
if (this.pastReady && !already) this.client.emit(Constants.Events.CHANNEL_CREATE, channel); if (this.pastReady) this.client.emit(Constants.Events.CHANNEL_CREATE, channel);
this.client.channels.set(channel.id, channel); this.client.channels.set(channel.id, channel);
} else if (already) {
return channel; return channel;
} }