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

[Core] Infinite typing when calling command within last second of cooldown #2985

Closed
jack1142 opened this issue Sep 7, 2019 · 3 comments · Fixed by #2987
Closed

[Core] Infinite typing when calling command within last second of cooldown #2985

jack1142 opened this issue Sep 7, 2019 · 3 comments · Fixed by #2987

Comments

@jack1142
Copy link
Member

@jack1142 jack1142 commented Sep 7, 2019

Other bugs

What were you trying to do?

Use a command with cooldown within last second of cooldown.

What were you expecting to happen?

Either get a cooldown message or have the command reinvoked (thinking of the latter because that's what it should by looking at the code)

What actually happened?

Infinite typing of a bot until you run that same command again.

How can we reproduce this issue?

  1. Use a command with cooldown.
  2. Use a command with cooldown again within last second of cooldown.

Code with the issue: https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/redbot/core/events.py#L235

@jack1142
Copy link
Member Author

@jack1142 jack1142 commented Sep 7, 2019

Oh and also typing shouldn't really be in there at all as the invoked command should be the one to handle it if it wants to.

@mikeshardmind
Copy link
Contributor

@mikeshardmind mikeshardmind commented Sep 7, 2019

If I recall correctly, the typing there was so that users knew something was going on during that delay.

Bot shouldn't be typing infinitely there though.

The problem with using typing is that discord only allows you to start typing. 10 seconds after that, or when you send a message, it stops being rendered as "[user] is typing" and not all commands will send a message.

@jack1142
Copy link
Member Author

@jack1142 jack1142 commented Sep 7, 2019

Yeah, though that delay should be less than second and I don't think triggering it is really needed there. The actual problem though is that due to way cooldown is handled in d.py we can't (easily) invoke the context again as cooldown is checked with time when message was sent.
I would just go with removing the whole less than a second handling and just regularly show that you should "try again in 1 second"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants