2022-03-19 17:37:45 +07:00
|
|
|
'use strict';
|
|
|
|
|
2022-03-24 17:55:32 +07:00
|
|
|
const { Events } = require('../../../util/Constants');
|
2022-03-19 17:37:45 +07:00
|
|
|
|
|
|
|
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
|
|
|
|
*/
|
2022-03-24 17:55:32 +07:00
|
|
|
client.emit(Events.SHARD_RESUME, shard.id, replayed);
|
2022-03-19 17:37:45 +07:00
|
|
|
};
|