fix(Structures): remove Structures (#6027)

This commit is contained in:
1Computer1
2021-07-04 07:26:35 -04:00
committed by GitHub
parent db60e367b4
commit ab0b3b9a07
11 changed files with 31 additions and 193 deletions

View File

@@ -1,15 +1,14 @@
'use strict';
const Action = require('./Action');
const VoiceState = require('../../structures/VoiceState');
const { Events } = require('../../util/Constants');
const Structures = require('../../util/Structures');
class VoiceStateUpdate extends Action {
handle(data) {
const client = this.client;
const guild = client.guilds.cache.get(data.guild_id);
if (guild) {
const VoiceState = Structures.get('VoiceState');
// Update the state
const oldState =
guild.voiceStates.cache.get(data.user_id)?._clone() ?? new VoiceState(guild, { user_id: data.user_id });