Closed DheathNone closed 2 years ago
Hi @DheathNone thanks for the issue!
From the error report this could be a discord.js issue. Could you post an issue on their GitHub at https://github.com/discordjs/discord.js instead? I think they could be of more help than me.
If anything crops up that is a coding issue on my bot, please let me know here!
I will keep this issue open for as long as possible.
The answer from there was basically that this is because of editing a interaction reply that is already dead or non existent.
Exactly similar error happens with Controls.ts:37:29
instead of Controls.ts:40:6
. At least in this case the error happens when changing songs. Approximately once per 4 songs.
Can you give me instructions on how to replicate this issue? :)
Jack
It seems that 15 minutes is the limit here. This is fine:
/play query: 14 min song
/play query: tutturuu
This fails always:
/play query: 15 min song
/play query: tutturuu
Here the commands are send together and when the next song is going to start the bot fails at editReply.
I happened to stumble upon the Discord js documentation when looking into this: https://discordjs.guide/interactions/replying-to-slash-commands.html#editing-responses After the initial response, an interaction token is valid for 15 minutes, so this is the timeframe in which you can edit the response and send follow-up messages.
Thanks so much for the info!
I am looking into this now. I feel confident I can get a solution pushed soon. 🙂
Sorry for the delay, I have been busy recently!
My solution to this has been added in commit 1d3c1e7414582753fe7be0a049b67a393b579927
I could handle the message to get around the 15 minute timer, however, it started to get very hacky and would most likely open a can of worms when it comes to the stability of the bot. So, I just made it so that before the 15 minutes are up, any interactive messages will have its contents edited to display a notice of expiry. This was the best way to handle it in my opinion, even if it isn't the nicest.
Hopefully the solution is OK! :)
Feel free to reopen if any related issues arise.
When using the bot commands the bot seems to crash randomly.
Logs:
Note: Running under Rasberry pi 3 and it seems to be mostly working.