Initial commit
This commit is contained in:
14
src/client/websocket/handlers/RESUMED.js
Normal file
14
src/client/websocket/handlers/RESUMED.js
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
const Events = require('../../../util/Events');
|
||||
|
||||
module.exports = (client, packet, shard) => {
|
||||
const replayed = shard.sequence - shard.closeSequence;
|
||||
/**
|
||||
* Emitted when a shard resumes successfully.
|
||||
* @event Client#shardResume
|
||||
* @param {number} id The shard id that resumed
|
||||
* @param {number} replayedEvents The amount of replayed events
|
||||
*/
|
||||
client.emit(Events.ShardResume, shard.id, replayed);
|
||||
};
|
||||
Reference in New Issue
Block a user