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: split up ctx.match #700

Open
Tracked by #675
KnorpelSenf opened this issue Dec 15, 2024 · 0 comments
Open
Tracked by #675

feat: split up ctx.match #700

KnorpelSenf opened this issue Dec 15, 2024 · 0 comments

Comments

@KnorpelSenf
Copy link
Member

It makes little sense to have a very ambiguous property ctx.match that narrows down its type in various different ways depending on the handler.

Instead, we should have different dedicated properties that get installed for each use case:

  • ctx.match for regex
  • ctx.payload for strings
  • ctx.args for command arguments
  • etc

The types for bot.hears etc need to be adjusted accordingly.

@KnorpelSenf KnorpelSenf mentioned this issue Dec 15, 2024
48 tasks
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

No branches or pull requests

1 participant