call state

This commit is contained in:
Elysia 2024-01-12 22:29:12 +07:00
parent 609cce3631
commit e48e9e8dd8
3 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
'use strict'; 'use strict';
const Call = require('../../../structures/Call'); const CallState = require('../../../structures/CallState');
const { Events } = require('../../../util/Constants'); const { Events } = require('../../../util/Constants');
module.exports = (client, packet) => { module.exports = (client, packet) => {
for (const voice of packet.d.voice_states) { for (const voice of packet.d.voice_states) {
@ -8,7 +8,7 @@ module.exports = (client, packet) => {
/** /**
* Emitted whenever received a call * Emitted whenever received a call
* @event Client#callCreate * @event Client#callCreate
* @param {Call} call Call * @param {CallState} call Call
*/ */
client.emit(Events.CALL_CREATE, new Call(client, packet.d)); client.emit(Events.CALL_CREATE, new CallState(client, packet.d));
}; };

View File

@ -1,5 +1,5 @@
'use strict'; 'use strict';
const Call = require('../../../structures/Call'); const CallState = require('../../../structures/CallState');
const { Events } = require('../../../util/Constants'); const { Events } = require('../../../util/Constants');
module.exports = (client, packet) => { module.exports = (client, packet) => {
/** /**
@ -7,5 +7,5 @@ module.exports = (client, packet) => {
* @event Client#callDelete * @event Client#callDelete
* @param {Call} call Call * @param {Call} call Call
*/ */
client.emit(Events.CALL_DELETE, new Call(client, packet.d)); client.emit(Events.CALL_DELETE, new CallState(client, packet.d));
}; };

View File

@ -1,5 +1,5 @@
'use strict'; 'use strict';
const Call = require('../../../structures/Call'); const CallState = require('../../../structures/CallState');
const { Events } = require('../../../util/Constants'); const { Events } = require('../../../util/Constants');
module.exports = (client, packet) => { module.exports = (client, packet) => {
/** /**
@ -7,5 +7,5 @@ module.exports = (client, packet) => {
* @event Client#callUpdate * @event Client#callUpdate
* @param {Call} call Call * @param {Call} call Call
*/ */
client.emit(Events.CALL_UPDATE, new Call(client, packet.d)); client.emit(Events.CALL_UPDATE, new CallState(client, packet.d));
}; };