Fix guild.members.fetch()
New event: guildMemberListUpdate (same as guildMemberChunk)
This commit is contained in:
March 7th
2022-04-11 19:48:20 +07:00
parent 9672b325a1
commit 89d8b08a08
7 changed files with 194 additions and 78 deletions

View File

@@ -254,18 +254,33 @@ exports.Status = {
};
exports.Opcodes = {
DISPATCH: 0,
HEARTBEAT: 1,
IDENTIFY: 2,
STATUS_UPDATE: 3,
VOICE_STATE_UPDATE: 4,
VOICE_GUILD_PING: 5,
RESUME: 6,
RECONNECT: 7,
REQUEST_GUILD_MEMBERS: 8,
INVALID_SESSION: 9,
HELLO: 10,
HEARTBEAT_ACK: 11,
DISPATCH: 0, // # Receive dispatches an event
HEARTBEAT: 1, // # Send/Receive used for ping checking
IDENTIFY: 2, // # Send used for client handshake
STATUS_UPDATE: 3, // # Send used to update the client status
VOICE_STATE_UPDATE: 4, // # Send used to join/move/leave voice channels
VOICE_GUILD_PING: 5, // # Send used for voice ping checking
RESUME: 6, // # Send used to resume a closed connection
RECONNECT: 7, // # Receive used to tell when to reconnect (sometimes...)
REQUEST_GUILD_MEMBERS: 8, // # Send used to request guild members (when searching for members in the search bar of a guild)
INVALID_SESSION: 9, // # Receive used to notify client they have an invalid session id
HELLO: 10, // # Receive sent immediately after connecting, contains heartbeat and server debug information
HEARTBEAT_ACK: 11, // # Sent immediately following a client heartbeat that was received
// GUILD_SYNC: 12, // # Receive guild_sync but not used anymore
/** Add some opcode from Discum
/* @extends https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/gateway/gateway.py#L56
*/
DM_UPDATE: 13, // # Send used to get dm features
LAZY_REQUEST: 14, // # Send discord responds back with GUILD_MEMBER_LIST_UPDATE type SYNC...
LOBBY_CONNECT: 15,
LOBBY_DISCONNECT: 16,
LOBBY_VOICE_STATE_UPDATE: 17, // # Receive
STREAM_CREATE: 18,
STREAM_DELETE: 19,
STREAM_WATCH: 20,
STREAM_PING: 21, // # Send
STREAM_SET_PAUSED: 22,
REQUEST_APPLICATION_COMMANDS: 24, // # Send request application/bot cmds (user, message, and slash cmds)
};
exports.Events = {
@@ -295,6 +310,7 @@ exports.Events = {
GUILD_MEMBER_UPDATE: 'guildMemberUpdate',
GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable',
GUILD_MEMBERS_CHUNK: 'guildMembersChunk',
GUILD_MEMBER_LIST_UPDATE: 'guildMemberListUpdate',
GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate',
GUILD_ROLE_CREATE: 'roleCreate',
GUILD_ROLE_DELETE: 'roleDelete',