File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
33const Action = require ( './Action' ) ;
4- const VoiceState = require ( '../../structures/VoiceState' ) ;
54const { Events } = require ( '../../util/Constants' ) ;
5+ const Structures = require ( '../../util/Structures' ) ;
66
77class VoiceStateUpdate extends Action {
88 handle ( data ) {
99 const client = this . client ;
1010 const guild = client . guilds . cache . get ( data . guild_id ) ;
1111 if ( guild ) {
12+ const VoiceState = Structures . get ( 'VoiceState' ) ;
1213 // Update the state
1314 const oldState = guild . voiceStates . cache . has ( data . user_id )
1415 ? guild . voiceStates . cache . get ( data . user_id ) . _clone ( )
Original file line number Diff line number Diff line change 11'use strict' ;
22
33const BaseManager = require ( './BaseManager' ) ;
4- const VoiceState = require ( '../structures/VoiceState' ) ;
54
65/**
76 * Manages API methods for VoiceStates and stores their cache.
87 * @extends {BaseManager }
98 */
109class VoiceStateManager extends BaseManager {
1110 constructor ( guild , iterable ) {
12- super ( guild . client , iterable , VoiceState ) ;
11+ super ( guild . client , iterable , { name : ' VoiceState' } ) ;
1312 /**
1413 * The guild this manager belongs to
1514 * @type {Guild }
@@ -27,7 +26,7 @@ class VoiceStateManager extends BaseManager {
2726 const existing = this . cache . get ( data . user_id ) ;
2827 if ( existing ) return existing . _patch ( data ) ;
2928
30- const entry = new VoiceState ( this . guild , data ) ;
29+ const entry = new this . holds ( this . guild , data ) ;
3130 if ( cache ) this . cache . set ( data . user_id , entry ) ;
3231 return entry ;
3332 }
You can’t perform that action at this time.
0 commit comments