mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +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;
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ exports.DefaultOptions = {
|
||||
$referring_domain: '',
|
||||
},
|
||||
},
|
||||
protocol_version: 5,
|
||||
protocol_version: 6,
|
||||
max_message_cache: 200,
|
||||
rest_ws_bridge_timeout: 5000,
|
||||
};
|
||||
@@ -22,6 +22,13 @@ exports.Status = {
|
||||
IDLE: 3,
|
||||
};
|
||||
|
||||
exports.ChannelTypes = {
|
||||
text: 0,
|
||||
DM: 1,
|
||||
voice: 2,
|
||||
groupDM: 3,
|
||||
};
|
||||
|
||||
exports.Package = require('../../package.json');
|
||||
|
||||
exports.Errors = {
|
||||
|
||||
Reference in New Issue
Block a user