mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
chore: consistency/prettier (#3852)
* chore: consistency/prettier * chore: rebase * chore: rebase * chore: include typings * fix: include typings file in prettier lint-staged
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
const Action = require('./Action');
|
||||
const { Events } = require('../../util/Constants');
|
||||
const VoiceState = require('../../structures/VoiceState');
|
||||
const { Events } = require('../../util/Constants');
|
||||
|
||||
class VoiceStateUpdate extends Action {
|
||||
handle(data) {
|
||||
@@ -10,9 +10,9 @@ class VoiceStateUpdate extends Action {
|
||||
const guild = client.guilds.cache.get(data.guild_id);
|
||||
if (guild) {
|
||||
// Update the state
|
||||
const oldState = guild.voiceStates.cache.has(data.user_id) ?
|
||||
guild.voiceStates.cache.get(data.user_id)._clone() :
|
||||
new VoiceState(guild, { user_id: data.user_id });
|
||||
const oldState = guild.voiceStates.cache.has(data.user_id)
|
||||
? guild.voiceStates.cache.get(data.user_id)._clone()
|
||||
: new VoiceState(guild, { user_id: data.user_id });
|
||||
|
||||
const newState = guild.voiceStates.add(data);
|
||||
|
||||
@@ -41,5 +41,4 @@ class VoiceStateUpdate extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module.exports = VoiceStateUpdate;
|
||||
|
||||
Reference in New Issue
Block a user