mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
refactor: change xID to xId (#6036)
* refactor: change `xID` to `xId` * Update src/managers/MessageManager.js Co-authored-by: Noel <buechler.noel@outlook.com> Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -16,14 +16,14 @@ class ClientVoiceManager {
|
||||
Object.defineProperty(this, 'client', { value: client });
|
||||
|
||||
/**
|
||||
* Maps guild IDs to voice adapters created for use with @discordjs/voice.
|
||||
* Maps guild ids to voice adapters created for use with @discordjs/voice.
|
||||
* @type {Map<Snowflake, Object>}
|
||||
*/
|
||||
this.adapters = new Map();
|
||||
|
||||
client.on(Events.SHARD_DISCONNECT, (_, shardID) => {
|
||||
for (const [guildID, adapter] of this.adapters.entries()) {
|
||||
if (client.guilds.cache.get(guildID)?.shardID === shardID) {
|
||||
client.on(Events.SHARD_DISCONNECT, (_, shardId) => {
|
||||
for (const [guildId, adapter] of this.adapters.entries()) {
|
||||
if (client.guilds.cache.get(guildId)?.shardId === shardId) {
|
||||
adapter.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user