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

feat: Implement cooldowns for application commands #431

Merged
merged 16 commits into from
Jan 17, 2024

Conversation

Lulalaby
Copy link
Member

@Lulalaby Lulalaby commented Jan 15, 2024

Cooldowns

This pull request adds capabilities for cooldowns in CommandsNext and ApplicationCommands + Core

Implementation details

Cooldowns for CommandsNext add a ❌ reaction if the ratelimit was hit (but ignores if we don't have permissions).

cooldowns_commandsnext

Cooldowns for ApplicationCommands respond ephemeral with a message about the ratelimit hit and when to retry.

cooldowns_applicationcommands

TODOs

  • We might consider allowing devs to specify the way cooldowns will be (or even not) reported to the user.
  • Removal of grouping type perhaps

@Lulalaby Lulalaby requested review from NyuwBot and a team as code owners January 15, 2024 08:49
@Lulalaby Lulalaby requested review from Chibi310 and byterand January 15, 2024 08:49
@Lulalaby Lulalaby changed the title Implement cooldowns for slash commands Implement cooldowns for application commands Jan 15, 2024
@Lulalaby Lulalaby changed the title Implement cooldowns for application commands feat: Implement cooldowns for application commands Jan 15, 2024
@Lulalaby Lulalaby requested review from villChurch, xMaxximum and FabiChan99 and removed request for Chibi310 January 15, 2024 08:50
@Lulalaby Lulalaby self-assigned this Jan 15, 2024
@Lulalaby Lulalaby added enhancement New feature or request core Changes something in core labels Jan 15, 2024
@Lulalaby Lulalaby modified the milestone: APIv10 Jan 15, 2024
@Lulalaby Lulalaby force-pushed the feat/discatsharp.applicationcommands-cooldowns branch 2 times, most recently from 7442c41 to fc04960 Compare January 15, 2024 11:30
@Lulalaby Lulalaby requested a review from TheXorog January 15, 2024 11:32
@Lulalaby Lulalaby force-pushed the feat/discatsharp.applicationcommands-cooldowns branch 2 times, most recently from ed6f9d8 to 9331d94 Compare January 16, 2024 13:41
feat: move cooldown to discatsharp base package
chore: some experimental stuff
fix: commandsnext cooldowns
@Lulalaby Lulalaby force-pushed the feat/discatsharp.applicationcommands-cooldowns branch from 9331d94 to c5029d8 Compare January 16, 2024 13:47
@Lulalaby Lulalaby force-pushed the feat/discatsharp.applicationcommands-cooldowns branch from 59ad839 to 1ffb542 Compare January 17, 2024 00:44
@Lulalaby Lulalaby force-pushed the feat/discatsharp.applicationcommands-cooldowns branch from 9fe2694 to 042abe0 Compare January 17, 2024 02:02
Copy link

Documentation test build passed! 🎉
Visit the cloudflare action run in https://github.com/Aiko-IT-Systems/DisCatSharp.Docs/commits/feat/discatsharp.applicationcommands-cooldowns for details :3

gif

@Lulalaby Lulalaby merged commit d09d89b into main Jan 17, 2024
10 checks passed
@Lulalaby Lulalaby deleted the feat/discatsharp.applicationcommands-cooldowns branch January 17, 2024 14:05
Lulalaby added a commit that referenced this pull request Jul 10, 2024
* feat: make cooldowns work

feat: move cooldown to discatsharp base package
chore: some experimental stuff
fix: commandsnext cooldowns

* [ci skip] chore: resharper disable for sealed on CooldownBucket

* fix: try fixing translations (while i'm on it)

* fix: really fix translation export

* fix: fixed translations (while i'm on it)

* feat: add by discord added allowed locales

* [ci skip] chore: update release notes

* fix: fix registration of applicaiton commands when commands cleared or non existent in advance

* feat: custom cooldown responder

* docs: fix space -> tab

* Update RELEASENOTES.md

* fix: fix registration of translations for subcommands

* fix: nre

* chore: remove command grouping type

---------

Co-authored-by: Mira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes something in core enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants