evobot icon indicating copy to clipboard operation
evobot copied to clipboard

🐛 Evobot 2.3.1 stops music queue twice and the object destroys itself

Open diespinozah opened this issue 3 years ago • 2 comments

Describe the bug A description of what the bug is.

How To Reproduce Steps to reproduce the behavior:

  1. play a song
  2. stop the song with the emoji (stop button reaction)
  3. bot ended the queue twice

Expected behavior A description of what you expected to happen. bot end the queue once. When it ends the queue twice should destroy 2 objects and the bot crash Environment (add if possible)

  • Node.js version: 18.9.0

Additional information & screenshots image image

Add any other context or screenshots about the problem here.

diespinozah avatar Sep 18 '22 01:09 diespinozah

Thanks will look into it

eritislami avatar Sep 19 '22 07:09 eritislami

I'm not too familiar with Node so it might not be the best way, but I managed to fix it by editing the file structs/MusicQueue.ts and replacing the line 121:

this.connection.destroy();

with the following:

if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {
  try {
     this.connection.destroy();
  } catch {}
}

Quack6765 avatar Sep 20 '22 15:09 Quack6765

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 22 '22 18:10 stale[bot]

I'm not too familiar with Node so it might not be the best way, but I managed to fix it by editing the file structs/MusicQueue.ts and replacing the line 121:

this.connection.destroy();

with the following:

if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {
  try {
     this.connection.destroy();
  } catch {}
}

Thanks for the solution.

It fix the object destroying itself twice and killing the process. But it's still destroying the object and leaving the channel when you add more songs to the queue after a "stop" command.

diespinozah avatar Oct 25 '22 19:10 diespinozah

Should be handled by #1318

eritislami avatar Nov 11 '22 20:11 eritislami

Should be handled by #1318

When @Quack6666 posted the solution (same as the commit) I've been testing and it fixes partially the solution as I mentioned here

I'm not too familiar with Node so it might not be the best way, but I managed to fix it by editing the file structs/MusicQueue.ts and replacing the line 121:

this.connection.destroy();

with the following:

if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {
  try {
     this.connection.destroy();
  } catch {}
}

Thanks for the solution.

It fix the object destroying itself twice and killing the process. But it's still destroying the object and leaving the channel when you add more songs to the queue after a "stop" command.

diespinozah avatar Nov 11 '22 21:11 diespinozah

Should be handled by #1318

When @Quack6666 posted the solution (same as the commit) I've been testing and it fixes partially the solution as I mentioned here

I'm not too familiar with Node so it might not be the best way, but I managed to fix it by editing the file structs/MusicQueue.ts and replacing the line 121:

this.connection.destroy();

with the following:

if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {
  try {
     this.connection.destroy();
  } catch {}
}

Thanks for the solution. It fix the object destroying itself twice and killing the process. But it's still destroying the object and leaving the channel when you add more songs to the queue after a "stop" command.

Same thing here, sometimes it doesn't do it but sometimes it does still.

nikosszzz avatar Nov 15 '22 17:11 nikosszzz

Should be handled by #1318

When @Quack6666 posted the solution (same as the commit) I've been testing and it fixes partially the solution as I mentioned here

I'm not too familiar with Node so it might not be the best way, but I managed to fix it by editing the file structs/MusicQueue.ts and replacing the line 121:

this.connection.destroy();

with the following:

if (this.connection.state.status !== VoiceConnectionStatus.Destroyed) {
  try {
     this.connection.destroy();
  } catch {}
}

Thanks for the solution. It fix the object destroying itself twice and killing the process. But it's still destroying the object and leaving the channel when you add more songs to the queue after a "stop" command.

Same thing here, sometimes it doesn't do it but sometimes it does still.

Everytime I use Stop command (my "STAY_TIME" is 30 seconds) if I play another song before that, the bot will play the song but It will leave the channel anyways after that 30s. That happens to me.

diespinozah avatar Dec 02 '22 19:12 diespinozah

@diespinozah Should be fixed now

eritislami avatar Jan 16 '23 21:01 eritislami