Why is my bot not editing its own message
Hey,
I have coded my bot to have a "Refresh" button on one of its messages which allows members to get the latest information (fetched from my local sequelize db). This is working great in 90% of the guilds and channels, however I had a report of it not working in this particular guild and channel and I can confirm that to be the case.
I looked through some previous messages in this discord and they suggested logging out isEditable and having a look at the permissions against the bot user.
So I coded this into the command.
and I get.
I also check to see if the bot is in the channels member list like so
and it is.
I edit the message like so
and no error is thrown. I know the edit isn't working because I stuck a UUID into the message that changes on each edit and that has not changed.
Can I have some guidance on what could be causing the bot to successfully edit the message (as in doesn't throw an error), however not actually edit the message?
4 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staff[email protected]
node v18.17.0
I can also confirm that time between the command being executed and the refresh button being clicked is not an issue because this situation happens as soon as the user creates the message and clicks refresh.
This is visually what it looks like.
The UUID normally sits beneath the Updated at in the first embed, but on this screenshot I haven't added it in yet
You think that'll work?
The update worked a treat. Thank you!
Still interested to know why no error was thrown with the edit() function.