update sth

This commit is contained in:
March 7th
2022-04-16 11:59:23 +07:00
parent 116afbdddc
commit 7fc069f4b9
5 changed files with 16 additions and 3 deletions

View File

@@ -352,6 +352,7 @@ class WebSocketManager extends EventEmitter {
} else if (packet) {
/* Debug mode */
// console.log(`Unhandled packet: ${packet.t}`, packet);
this.client.emit(Events.UNHANDLED_PACKET, packet, shard);
}
return true;
}

View File

@@ -195,7 +195,7 @@ class MessagePayload {
}
const webembeds = this.options.embeds.filter(
(e) => !(e instanceof MessageEmbed),
(e) => e instanceof WebEmbed,
);
this.options.embeds = this.options.embeds.filter(e => e instanceof MessageEmbed);

View File

@@ -21,6 +21,10 @@ class WebEmbed {
*/
this.hidden = data.hidden ?? false;
}
/**
* @private
* @param {object} data
*/
_setup(data) {
/**
* Type image of this embed

View File

@@ -373,6 +373,8 @@ exports.Events = {
GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove',
RELATIONSHIP_ADD: 'relationshipAdd',
RELATIONSHIP_REMOVE: 'relationshipRemove',
/* Add */
UNHANDLED_PACKET: 'unhandledPacket',
};
exports.ShardEvents = {