update sth
This commit is contained in:
parent
116afbdddc
commit
7fc069f4b9
@ -352,6 +352,7 @@ class WebSocketManager extends EventEmitter {
|
|||||||
} else if (packet) {
|
} else if (packet) {
|
||||||
/* Debug mode */
|
/* Debug mode */
|
||||||
// console.log(`Unhandled packet: ${packet.t}`, packet);
|
// console.log(`Unhandled packet: ${packet.t}`, packet);
|
||||||
|
this.client.emit(Events.UNHANDLED_PACKET, packet, shard);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ class MessagePayload {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const webembeds = this.options.embeds.filter(
|
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);
|
this.options.embeds = this.options.embeds.filter(e => e instanceof MessageEmbed);
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@ class WebEmbed {
|
|||||||
*/
|
*/
|
||||||
this.hidden = data.hidden ?? false;
|
this.hidden = data.hidden ?? false;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @param {object} data
|
||||||
|
*/
|
||||||
_setup(data) {
|
_setup(data) {
|
||||||
/**
|
/**
|
||||||
* Type image of this embed
|
* Type image of this embed
|
||||||
|
@ -373,6 +373,8 @@ exports.Events = {
|
|||||||
GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove',
|
GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove',
|
||||||
RELATIONSHIP_ADD: 'relationshipAdd',
|
RELATIONSHIP_ADD: 'relationshipAdd',
|
||||||
RELATIONSHIP_REMOVE: 'relationshipRemove',
|
RELATIONSHIP_REMOVE: 'relationshipRemove',
|
||||||
|
/* Add */
|
||||||
|
UNHANDLED_PACKET: 'unhandledPacket',
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.ShardEvents = {
|
exports.ShardEvents = {
|
||||||
|
10
typings/index.d.ts
vendored
10
typings/index.d.ts
vendored
@ -44,6 +44,7 @@ import {
|
|||||||
APISelectMenuComponent,
|
APISelectMenuComponent,
|
||||||
APITemplateSerializedSourceGuild,
|
APITemplateSerializedSourceGuild,
|
||||||
APIUser,
|
APIUser,
|
||||||
|
GatewayOpcodes,
|
||||||
GatewayVoiceServerUpdateDispatchData,
|
GatewayVoiceServerUpdateDispatchData,
|
||||||
GatewayVoiceStateUpdateDispatchData,
|
GatewayVoiceStateUpdateDispatchData,
|
||||||
RESTPostAPIApplicationCommandsJSONBody,
|
RESTPostAPIApplicationCommandsJSONBody,
|
||||||
@ -4149,12 +4150,16 @@ export interface ClientEvents extends BaseClientEvents {
|
|||||||
id: Snowflake,
|
id: Snowflake,
|
||||||
type: RelationshipType,
|
type: RelationshipType,
|
||||||
user: User,
|
user: User,
|
||||||
]
|
];
|
||||||
relationshipRemove: [
|
relationshipRemove: [
|
||||||
id: Snowflake,
|
id: Snowflake,
|
||||||
type: RelationshipType,
|
type: RelationshipType,
|
||||||
user: User,
|
user: User,
|
||||||
]
|
];
|
||||||
|
unhandledPacket: [
|
||||||
|
packet: { op: GatewayOpcodes | number, d?: any, s?: number, t?: string },
|
||||||
|
shard: WebSocketShard,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ClientFetchInviteOptions {
|
export interface ClientFetchInviteOptions {
|
||||||
@ -4407,6 +4412,7 @@ export interface ConstantsEvents {
|
|||||||
GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove',
|
GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove',
|
||||||
RELATIONSHIP_ADD: 'relationshipAdd',
|
RELATIONSHIP_ADD: 'relationshipAdd',
|
||||||
RELATIONSHIP_REMOVE: 'relationshipRemove',
|
RELATIONSHIP_REMOVE: 'relationshipRemove',
|
||||||
|
UNHANDLED_PACKET: 'unhandledPacket',
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ConstantsOpcodes {
|
export interface ConstantsOpcodes {
|
||||||
|
Loading…
Reference in New Issue
Block a user