mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 03:40:19 +00:00
Fixing indentation and removing unnecessary line changes
This commit is contained in:
parent
ff49fbd16c
commit
84a780723e
@ -6,23 +6,14 @@ module.exports = {
|
|||||||
const radio = client.radio.get(newState.guild.id);
|
const radio = client.radio.get(newState.guild.id);
|
||||||
if (!radio) return;
|
if (!radio) return;
|
||||||
|
|
||||||
if (
|
if (newState.member.id === client.user.id && oldState.member.id === client.user.id) {
|
||||||
newState.member.id === client.user.id &&
|
|
||||||
oldState.member.id === client.user.id
|
|
||||||
) {
|
|
||||||
if (newState.channel === null) {
|
if (newState.channel === null) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
||||||
return client.radio.delete(newState.guild.id);
|
return client.radio.delete(newState.guild.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const newPermissions = newState.channel.permissionsFor(
|
const newPermissions = newState.channel.permissionsFor(newState.client.user);
|
||||||
newState.client.user
|
if (!newPermissions.has("CONNECT") || !newPermissions.has("SPEAK") || !newPermissions.has("VIEW_CHANNEL")) {
|
||||||
);
|
|
||||||
if (
|
|
||||||
!newPermissions.has("CONNECT") ||
|
|
||||||
!newPermissions.has("SPEAK") ||
|
|
||||||
!newPermissions.has("VIEW_CHANNEL")
|
|
||||||
) {
|
|
||||||
try {
|
try {
|
||||||
setTimeout(
|
setTimeout(
|
||||||
async () => (radio.connection = await oldState.channel.join()),
|
async () => (radio.connection = await oldState.channel.join()),
|
||||||
@ -42,18 +33,9 @@ module.exports = {
|
|||||||
radio.connection = await newState.channel.join();
|
radio.connection = await newState.channel.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (
|
if ((oldState.channel.members.size === 1 && oldState.channel === radio.voiceChannel) || change) {
|
||||||
(oldState.channel.members.size === 1 &&
|
|
||||||
oldState.channel === radio.voiceChannel) ||
|
|
||||||
change
|
|
||||||
) {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (
|
if (!radio || !radio.connection.dispatcher || !radio.connection.dispatcher === null) return;
|
||||||
!radio ||
|
|
||||||
!radio.connection.dispatcher ||
|
|
||||||
!radio.connection.dispatcher === null
|
|
||||||
)
|
|
||||||
return;
|
|
||||||
if (radio.voiceChannel.members.size === 1) {
|
if (radio.voiceChannel.members.size === 1) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
||||||
radio.connection.dispatcher.destroy();
|
radio.connection.dispatcher.destroy();
|
||||||
|
Loading…
Reference in New Issue
Block a user