Error Fetching Discord Channel in FastAPI and discord.py Integration: '_MissingSentinel' object has no attribute 'is_set #10108
Unanswered
MaTwickenham
asked this question in
Q&A
Replies: 1 comment
-
The client is an async context manager, your issue here comes from not using it as one. See the example on customizing client startup here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue Description:
I am integrating discord.py with FastAPI, and both the FastAPI server and the Discord bot (client) start correctly, triggering the on_ready() method as expected. However, when the forward_via_channel() method is triggered, it raises the following exception:
'_MissingSentinel' object has no attribute 'is_set'
This happens when attempting to fetch a channel using
channel = await self.client.fetch_channel(channel_id)
inforward_via_channel ()
. I cannot retrieve the channel and need assistance resolving this issue.Can anyone help me figure out how to fix this problem?
main.py
discord_sender_service.py
Beta Was this translation helpful? Give feedback.
All reactions