refactor: switch api and gateway to V8 (#4879)

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
This commit is contained in:
Sugden
2021-02-11 17:10:35 +00:00
committed by GitHub
parent ae3c3d80ee
commit ee5bc1a5c4
33 changed files with 372 additions and 364 deletions

View File

@@ -10,9 +10,9 @@ class ChannelCreateAction extends Action {
const channel = client.channels.add(data);
if (!existing && channel) {
/**
* Emitted whenever a channel is created.
* Emitted whenever a guild channel is created.
* @event Client#channelCreate
* @param {DMChannel|GuildChannel} channel The channel that was created
* @param {GuildChannel} channel The channel that was created
*/
client.emit(Events.CHANNEL_CREATE, channel);
}

View File

@@ -6,7 +6,7 @@ const { Events } = require('../../util/Constants');
class MessageCreateAction extends Action {
handle(data) {
const client = this.client;
const channel = client.channels.cache.get(data.channel_id);
const channel = this.getChannel(data);
if (channel) {
const existing = channel.messages.cache.get(data.id);
if (existing) return { message: existing };

View File

@@ -22,7 +22,6 @@ class PresenceUpdateAction extends Action {
if (!member && data.status !== 'offline') {
member = guild.members.add({
user,
roles: data.roles,
deaf: false,
mute: false,
});