feat: VoiceChannel Status

This commit is contained in:
Elysia
2024-01-26 20:26:39 +07:00
parent c257659c99
commit 5962c59684
3 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
'use strict';
const { Events } = require('../../../util/Constants');
module.exports = (client, { d: data }) => {
const channel = client.channels.cache.get(data.id);
if (channel) {
const old = channel._clone();
channel.status = data.status;
client.emit(Events.CHANNEL_UPDATE, old, channel);
}
};

View File

@@ -75,6 +75,7 @@ const handlers = Object.fromEntries([
['CALL_DELETE', require('./CALL_DELETE')],
['USER_SETTINGS_UPDATE', require('./USER_SETTINGS_UPDATE')],
['USER_GUILD_SETTINGS_UPDATE', require('./USER_GUILD_SETTINGS_UPDATE')],
['VOICE_CHANNEL_STATUS_UPDATE', require('./VOICE_CHANNEL_STATUS_UPDATE')],
]);
module.exports = handlers;