1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-12-02 11:52:56 +00:00
Commit graph

10 commits

Author SHA1 Message Date
diamondburned bc3439b8ff
cmdroute: Further deprecate Handle{Command,Autocompletion}
These functions now call HandleInteraction directly, which then calls
internal functions. For incorrect uses, this change is breaking.
2024-07-06 12:42:00 +07:00
蒟蒻 529272a9a9
cmdroute: Fix Autocompleter handling (#423)
* handle group with cmdroute/autocompleter

* handle autocompleter: find all options
2024-03-18 23:09:44 -07:00
diamondburned 19518a0844
cmdroute: Implement Router.{With,Group}
This commit implements cmdroute.Router.Group and cmdroute.Router.With,
similar to go-chi's Mux.

Fixes #418
2024-02-06 23:45:48 -08:00
diamondburned 093436066e
cmdroute: Fix OverwriteCommands being broken 2023-11-04 01:48:17 -07:00
Cléo Rebert 8f548d2607 go fmt + gci
Signed-off-by: Cléo Rebert <cleo.rebert@gmail.com>
2023-09-19 11:37:24 -07:00
Cléo Rebert d36955acea Move away from github.com/pkg/errors
Signed-off-by: Cléo Rebert <cleo.rebert@gmail.com>
2023-09-19 11:37:24 -07:00
diamondburned 4bc415f72b
cmdroute: Add ev.Data into {Command,Autocomplete}Data
This mostly helps avoid a type assertion that could potentially be
incorrectly done.
2023-08-31 23:42:35 -07:00
diamondburned 3cb993aff9
cmdroute: Allow routing ComponentInteraction 2023-08-04 14:14:00 -07:00
diamondburned 080c734b37
cmdroute: Add OverwriteCommands
This adds a small helper function just for convenience.
2022-12-10 06:02:37 -08:00
diamondburned 181dcb1bdd
api: Introduce api/cmdroute
This commit introduces a slash commands and autocompletion router. It
abstracts the switch-cases that the user has to do in each
InteractionEvent handler away.

The router is largely inspired by go-chi's design. Refer to the tests
for examples.
2022-10-13 23:01:29 -07:00