message.remove_reaction does not remove reactions #21

Closed
opened 2026-02-15 23:16:15 -05:00 by yindo · 0 comments
Owner

Originally created by @MysticMia on GitHub (Jun 18, 2023).

Describe the bug
Using message.remove_reaction(...) does not remove the reaction as expected.

To Reproduce
await ctx.message.remove_reaction(emoji_id, user)

No code output.

Expected behavior
Expected it to remove the reaction of the given user (me, in this case). It instead didn't remove any reaction, not even the bot's own one.

Library version
0.1.11

Potential fix
I noticed a couple issues in the message.state.http.remove_reaction function.

  1. The function does not use the user_id and remove_all parameters
  2. The request does not give any params arguments, while it could put the user_id and remove_all parameters in here.
  3. The function uses a PUT request instead of DELETE

I managed to find a workaround / fix for this issue by calling my own request:

m = ctx.message
await m.state.http.request("DELETE", f"/channels/{m.channel.id}/messages/{m.id}/reactions/{emoji_id}", params={"user_id":user.id})
Originally created by @MysticMia on GitHub (Jun 18, 2023). **Describe the bug** Using message.remove_reaction(...) does not remove the reaction as expected. **To Reproduce** `await ctx.message.remove_reaction(emoji_id, user)` No code output. **Expected behavior** Expected it to remove the reaction of the given user (me, in this case). It instead didn't remove any reaction, not even the bot's own one. **Library version** 0.1.11 **Potential fix** I noticed a couple issues in the message.state.http.remove_reaction function. 1. The function does not use the `user_id` and `remove_all` parameters 2. The request does not give any `params` arguments, while it could put the user_id and remove_all parameters in here. 3. The function uses a PUT request instead of DELETE I managed to find a workaround / fix for this issue by calling my own request: ```py m = ctx.message await m.state.http.request("DELETE", f"/channels/{m.channel.id}/messages/{m.id}/reactions/{emoji_id}", params={"user_id":user.id}) ```
yindo added the unconfirmed bug label 2026-02-15 23:16:15 -05:00
yindo closed this issue 2026-02-15 23:16:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/python-client-sdk#21