[PR #28] [CLOSED] fix await error #67

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

📋 Pull Request Information

Original PR: https://github.com/stoatchat/python-client-sdk/pull/28
Author: @CaedenPH
Created: 3/6/2022
Status: Closed

Base: masterHead: master


📝 Commits (1)

📊 Changes

3 files changed (+6 additions, -7 deletions)

View changed files

📝 examples/commands.py (+4 -5)
📝 revolt/channel.py (+1 -1)
📝 revolt/client.py (+1 -1)

📄 Description

Task exception was never retrieved
future: <Task finished name='Task-19' coro=<Client.on_message() done, defined at /home/Caeden/Github/revolt.py/__main__.py:6> exception=TypeError("object str can't be used in 'await' expression")>
Traceback (most recent call last):
  File "/home/Caeden/Github/revolt.py/__main__.py", line 8, in on_message
    await message.channel.send("hi how are you")
  File "/home/Caeden/Github/revolt.py/revolt/messageable.py", line 62, in send
    message = await self.state.http.send_message(await self._get_channel_id(), content, embed_payload, attachments, reply_payload, masquerade_payload)
TypeError: object str can't be used in 'await' expression

_get_channel_id was not an asynchronous function

  • make api_url and max_messages a kwarg

🔄 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/28 **Author:** [@CaedenPH](https://github.com/CaedenPH) **Created:** 3/6/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`6eae654`](https://github.com/stoatchat/python-client-sdk/commit/6eae654466064bb9b832446424c8dbcee4bd87a9) fix await error ### 📊 Changes **3 files changed** (+6 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `examples/commands.py` (+4 -5) 📝 `revolt/channel.py` (+1 -1) 📝 `revolt/client.py` (+1 -1) </details> ### 📄 Description ``` Task exception was never retrieved future: <Task finished name='Task-19' coro=<Client.on_message() done, defined at /home/Caeden/Github/revolt.py/__main__.py:6> exception=TypeError("object str can't be used in 'await' expression")> Traceback (most recent call last): File "/home/Caeden/Github/revolt.py/__main__.py", line 8, in on_message await message.channel.send("hi how are you") File "/home/Caeden/Github/revolt.py/revolt/messageable.py", line 62, in send message = await self.state.http.send_message(await self._get_channel_id(), content, embed_payload, attachments, reply_payload, masquerade_payload) TypeError: object str can't be used in 'await' expression ``` `_get_channel_id` was not an asynchronous function - make api_url and max_messages a kwarg --- <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:30 -05:00
yindo closed this issue 2026-02-15 23:16:30 -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#67