-
-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 Missing Permissions trying to delete bot messages #487
Comments
Looks like it can be fixed by adding a filter that checks msg.author.id==options.authorId. Another thing I noticed is that messagetype 21 can't be deleted according to discord docs but the filter in undiscord is <=21, so including it and throwing errors, not sure why. They seem to be thread starter messages and discord docs list them as not deletable. Though in my case the error I got was "system message can't be deleted". Perhaps the deletion succeeded but it stayed up as a "system message" with empty content which then couldn't be further deleted. In discord itself it shows it as "couldn't fetch this message" or sth like that. I wonder if the empty content is how it gets detected. No idea. |
I handled this in a less space-friendly method (matching message ID to a set, skipping fetches if they previously failed), but I really like your solution to this! As it stands, I think this is fixed on my fork if anyone runs into it again (although it sounds like you figured out the problem already 💯) |
sorry im a noob to all this. how do i go about adding a filter? |
Fixed in #629 :) |
Undiscord Version
5.2.1
Browser
Firefox
Extension
TamperMonkey
Reproduction steps
There's a bot on the server that has commands you can run.
Those commands result in messages that aren't MY messages but they are the bot's message, but I am the "initiator" so to speak.
Undiscord is trying to delete those. I do not have the permission to delete them, as they aren't posted by me but by the bot.
Any way to fix that?
Actual results
Repeatedly tries to delete the message and keeps getting 403. Feels uncomfortable man.
Expected results
Do not try to delete bot messages that aren't my own. Or provide an option for this.
Bug affects
Additional information & file uploads
Not sure what I'm expected to put here.
The text was updated successfully, but these errors were encountered: