Closed tiltowait closed 2 years ago
Fixed in 4.2.4
Unfortunately, this seems only partially fixed as of 4.2.6.
I have the following user interaction flow that occurs in DMs:
SelectMenu
)Steps 1-3 all work fine. The bot sends the message in the DM, and the user is able to select the component, which the bot sees. However, at step 4, I get the Unknown Channel
error above. This error only occurs if I use ctx.author.send()
in step 2. If I create a DM channel in step 2, then step 4 finishes correctly, and the loop proceeds.
If it matters (only mentioning this because the example code all uses them), I am not using slash commands.
I will look at it. Thanks for reporting 😃
Sorry, but I'm still experiencing the error even in v4.2.7. Referring to my flow above, it now successfully completes step 4; however, upon executing step 5 (return to step 2), I get the same error as before.
I have written a trivial example that generates the Unknown Channel
error. This fails consistently on my end when using discord-ui but not when using vanilla discord.py.
cached_ctx = None
@bot.command()
async def test_test(ctx):
global cached_ctx
if cached_ctx is None:
cached_ctx = ctx
await cached_ctx.author.send("Hi") # OK
else:
await cached_ctx.author.send("Bye") # Should work but generates error
Thanks for the work so far! We're getting closer.
discord-ui 4.2.7 discord.py 1.7.3 python 3.9.6
aight thanks for your patience, this should hopefully finally be fixed in v4.2.8
It works now. Thanks for the quick work.
When using
discord-ui
, any attempt to perform anawait ctx.author.send(...)
results in the following error:Currently, I'm working around it by manually creating a DM channel, but it's an ugly kludge.