Skip to content

Conversation

@Zabuzard
Copy link
Member

Overview

This adds the /change-help-title command, upon request. Pretty straightforward:

example

While at it, the code for dealing with categories and titles has been simplified a bit by introducing a helper record.

Also, changed the cooldown of other commands to 30mins as well.

* also, changed the cooldown of other commands to 30mins as well
@Zabuzard Zabuzard added new command Add a new command or group of commands to the bot priority: normal labels Jun 21, 2022
@Zabuzard Zabuzard self-assigned this Jun 21, 2022
@Zabuzard Zabuzard requested review from a team as code owners June 21, 2022 08:43
@Zabuzard Zabuzard requested a review from Tais993 June 22, 2022 07:32
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@marko-radosavljevic marko-radosavljevic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, changed the cooldown of other commands to 30mins as well.

What's the reasoning for this change? It can be abused and trigger rate limits?

@Zabuzard
Copy link
Member Author

What's the reasoning for this change? It can be abused and trigger rate limits?

I reduced it from 60mins to 30mins. Cause people, like Ala, complained. And Tijs said that the rate limits should be able to handle it still.

But yes, the reason for having the cooldown in the first place are rate limits. The UX is terrible if you hit the rate limit and we have no way of knowing when we hit it. JDA just sends out ur request but Discord does not process it yet. Its not like ur method crashes with an exception or anything.

So I am trying to prevent them from happening in the first place, for regular usage.

@Tais993
Copy link
Member

Tais993 commented Jun 22, 2022

Its not like ur method crashes with an exception or anything.

https://ci.dv8tion.net/job/JDA5/javadoc/net/dv8tion/jda/api/requests/RestAction.html#timeout(long,java.util.concurrent.TimeUnit)

It'll fail with a TimeoutException, not sure or this goes in the failure consumer or just throws.

If we timeout to like, 20s we know for certain whenever we got ratelimited (unless Discord servers crashed)

@Zabuzard
Copy link
Member Author

Guess I should dive a bit deeper into the rate limit topic for this, eventually. Thanks for the headsup.

@Zabuzard Zabuzard merged commit 5e28950 into develop Jun 23, 2022
@Zabuzard Zabuzard deleted the feature/change_title_command branch June 23, 2022 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new command Add a new command or group of commands to the bot priority: normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants