Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typing context not exiting after a webhook is called #1542

Closed
2 tasks done
rvorias opened this issue Mar 9, 2023 · 2 comments
Closed
2 tasks done

typing context not exiting after a webhook is called #1542

rvorias opened this issue Mar 9, 2023 · 2 comments
Labels
wontfix Working as intended, or not feasible

Comments

@rvorias
Copy link

rvorias commented Mar 9, 2023

Steps to reproduce

async with bot.rest.trigger_typing(event.channel_id):
  await webhook.execute(
    content=text,
    username=name,
    avatar_url= avatar_url,
    mentions_everyone=False,
    user_mentions=False,
    role_mentions=False,
  )

Expected result

The typing indicator should stop after the context is exited.

Actual result

The typing context continues for a couple of seconds.

System info

hikari (2.0.0.dev117) [4adbadcf]
located at /home/user/.cache/pypoetry/virtualenvs/bot-python-daSyDz8E-py3.11/lib/python3.11/site-packages/hikari
CPython 3.11.1 GCC 9.4.0
Linux main 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64

Further info

No response

Checklist

  • I have made sure to remove ANY sensitive information (bot token, passwords, credentials, personal details, etc.).
  • I have searched the issue tracker and have made sure it's not a duplicate. If it is a follow up of another issue, I have specified it.
@rvorias rvorias added the bug Something isn't working label Mar 9, 2023
@davfsa
Copy link
Member

davfsa commented Mar 9, 2023

This is working as intended (on Discords end). The typing context manager will keep sending the typing indicator to Discord every 9 seconds, and Discord clients remove the typing indicator as soon as they receive a message from the account that triggered the indicator.

In this case, you are never sending a message as the account that triggered the indicator, but as a webhook. The typing status removal that you see is that of the timeout of 10 seconds happening and you already being out of the context manager, leading hikari to not send any further typing indicators.

And just for completion in this answer, no, there is no way to send a webhook typing indicator at this point in time. You will have to open a feature request in the Discord GitHub Repository.

As there is nothing we can do here, I will be closing this issue.

If you have any futher questions, feel free to join our Discord server using this invite link: https://discord.gg/hikari. We will be glad to help you out with any further questions you might have!

@davfsa davfsa closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2023
@davfsa davfsa added wontfix Working as intended, or not feasible and removed bug Something isn't working labels Mar 9, 2023
@rvorias
Copy link
Author

rvorias commented Mar 9, 2023

Makes sense, thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Working as intended, or not feasible
Projects
None yet
Development

No branches or pull requests

2 participants