update back to v6 (again) and start work patching the lib

This commit is contained in:
Amish Shah
2016-08-13 16:41:06 +01:00
parent 75e3ee86fb
commit 7ada70f856
2 changed files with 11 additions and 4 deletions

View File

@@ -46,15 +46,15 @@ class ClientDataStore extends AbstractDataStore {
let guild = $guild;
const already = this.get('channels', data.id);
let channel;
if (data.is_private) {
if (data.type === Constants.ChannelTypes.DM) {
channel = new DMChannel(this.client, data);
} else {
guild = guild || this.get('guilds', data.guild_id);
if (guild) {
if (data.type === 'text') {
if (data.type === Constants.ChannelTypes.text) {
channel = new TextChannel(guild, data);
guild.store.add('channels', channel);
} else if (data.type === 'voice') {
} else if (data.type === Constants.ChannelTypes.voice) {
channel = new VoiceChannel(guild, data);
guild.store.add('channels', channel);
}