mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
update back to v6 (again) and start work patching the lib
This commit is contained in:
@@ -46,15 +46,15 @@ class ClientDataStore extends AbstractDataStore {
|
|||||||
let guild = $guild;
|
let guild = $guild;
|
||||||
const already = this.get('channels', data.id);
|
const already = this.get('channels', data.id);
|
||||||
let channel;
|
let channel;
|
||||||
if (data.is_private) {
|
if (data.type === Constants.ChannelTypes.DM) {
|
||||||
channel = new DMChannel(this.client, data);
|
channel = new DMChannel(this.client, data);
|
||||||
} else {
|
} else {
|
||||||
guild = guild || this.get('guilds', data.guild_id);
|
guild = guild || this.get('guilds', data.guild_id);
|
||||||
if (guild) {
|
if (guild) {
|
||||||
if (data.type === 'text') {
|
if (data.type === Constants.ChannelTypes.text) {
|
||||||
channel = new TextChannel(guild, data);
|
channel = new TextChannel(guild, data);
|
||||||
guild.store.add('channels', channel);
|
guild.store.add('channels', channel);
|
||||||
} else if (data.type === 'voice') {
|
} else if (data.type === Constants.ChannelTypes.voice) {
|
||||||
channel = new VoiceChannel(guild, data);
|
channel = new VoiceChannel(guild, data);
|
||||||
guild.store.add('channels', channel);
|
guild.store.add('channels', channel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ exports.DefaultOptions = {
|
|||||||
$referring_domain: '',
|
$referring_domain: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
protocol_version: 5,
|
protocol_version: 6,
|
||||||
max_message_cache: 200,
|
max_message_cache: 200,
|
||||||
rest_ws_bridge_timeout: 5000,
|
rest_ws_bridge_timeout: 5000,
|
||||||
};
|
};
|
||||||
@@ -22,6 +22,13 @@ exports.Status = {
|
|||||||
IDLE: 3,
|
IDLE: 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.ChannelTypes = {
|
||||||
|
text: 0,
|
||||||
|
DM: 1,
|
||||||
|
voice: 2,
|
||||||
|
groupDM: 3,
|
||||||
|
};
|
||||||
|
|
||||||
exports.Package = require('../../package.json');
|
exports.Package = require('../../package.json');
|
||||||
|
|
||||||
exports.Errors = {
|
exports.Errors = {
|
||||||
|
|||||||
Reference in New Issue
Block a user