[PR #65] [MERGED] Fix wrong type being passed to params dict for remove_reaction #84

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

📋 Pull Request Information

Original PR: https://github.com/stoatchat/python-client-sdk/pull/65
Author: @Solarphlare
Created: 7/26/2023
Status: Merged
Merged: 7/27/2023
Merged by: @Zomatree

Base: masterHead: master


📝 Commits (1)

  • 1217fb3 Fix wrong query param types for remove_reaction

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 revolt/http.py (+1 -1)

📄 Description

aiohttp's request method can only accept a dict with values of type str, float or int for the request's parameters. However, a boolean value is added to the parameters dictionary at this line:
https://github.com/revoltchat/revolt.py/blob/7ae2a566109fbf0a0e106462a7308798df59b2fe/revolt/http.py#L407

Because of this, aiottp throws the following error:

TypeError: Invalid variable type: value should be str, int or float, got False of type <class 'bool'>

This PR resolves the issue by converting the bool to either "true" or "false" before making the request.

Please make sure to check the following tasks before opening and submitting a PR

  • I understand and have followed the contribution guide
  • I have tested my changes locally and they are working as intended
  • These changes do not have any notable side effects on other Revolt projects

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stoatchat/python-client-sdk/pull/65 **Author:** [@Solarphlare](https://github.com/Solarphlare) **Created:** 7/26/2023 **Status:** ✅ Merged **Merged:** 7/27/2023 **Merged by:** [@Zomatree](https://github.com/Zomatree) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`1217fb3`](https://github.com/stoatchat/python-client-sdk/commit/1217fb325f440645d8f71929c6f663f144df42f3) Fix wrong query param types for remove_reaction ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `revolt/http.py` (+1 -1) </details> ### 📄 Description aiohttp's `request` method can only accept a dict with values of type str, float or int for the request's parameters. However, a boolean value is added to the parameters dictionary at this line: https://github.com/revoltchat/revolt.py/blob/7ae2a566109fbf0a0e106462a7308798df59b2fe/revolt/http.py#L407 Because of this, aiottp throws the following error: ``` TypeError: Invalid variable type: value should be str, int or float, got False of type <class 'bool'> ``` This PR resolves the issue by converting the bool to either `"true"` or `"false"` before making the request. ## Please make sure to check the following tasks before opening and submitting a PR * [x] I understand and have followed the [contribution guide](https://github.com/revoltchat/revolt/discussions/282) * [x] I have tested my changes locally and they are working as intended * [x] These changes do not have any notable side effects on other Revolt projects --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 23:16:35 -05:00
yindo closed this issue 2026-02-15 23:16:35 -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#84