mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 06:20:20 +00:00
Update voiceStateUpdate event
This commit is contained in:
parent
1f4c3a08d0
commit
062a163a11
@ -14,7 +14,7 @@ module.exports = {
|
|||||||
if (newState.member.id === client.user.id && oldState.member.id === client.user.id) {
|
if (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.statistics.update(client, newState.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop');
|
client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop');
|
||||||
@ -36,7 +36,7 @@ module.exports = {
|
|||||||
1000
|
1000
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.statistics.update(client, newState.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop');
|
client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop');
|
||||||
@ -55,7 +55,7 @@ module.exports = {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!radio || !radio.connection || !radio.connection === null) return;
|
if (!radio || !radio.connection || !radio.connection === null) return;
|
||||||
if (radio.voiceChannel.members.size === 1) {
|
if (radio.voiceChannel.members.size === 1) {
|
||||||
client.funcs.statisticsUpdate(client, newState.guild, radio);
|
client.statistics.update(client, newState.guild, radio);
|
||||||
radio.connection?.destroy();
|
radio.connection?.destroy();
|
||||||
radio.message?.delete();
|
radio.message?.delete();
|
||||||
client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop');
|
client.funcs.logger('Radio', newState.guild.id + " / " + 'Stop');
|
||||||
|
Loading…
Reference in New Issue
Block a user