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: bot.command() should match any bot command #685

Open
Tracked by #675
KnorpelSenf opened this issue Dec 15, 2024 · 2 comments · May be fixed by #733
Open
Tracked by #675

feat: bot.command() should match any bot command #685

KnorpelSenf opened this issue Dec 15, 2024 · 2 comments · May be fixed by #733

Comments

@KnorpelSenf
Copy link
Member

This is inconsistent with how empty disjunctions work in logic, but who cares. We need this feature and there is no way of doing it yet. That syntax would be very concise.

Are there better ideas, such as passing no arguments (=making the first param optional)? Maybe both?

@KnorpelSenf KnorpelSenf mentioned this issue Dec 15, 2024
51 tasks
@wojpawlik wojpawlik changed the title feat: bot.command([]) should match any bot command feat: bot.command() should match any bot command Dec 31, 2024
@wojpawlik
Copy link
Contributor

We've settled on making the first param optional, allowing

bot.command(undefined, ...);
bot.command().use(...);

Should that match commands meant for other bots?

@KnorpelSenf
Copy link
Member Author

No. Commands for other bots should never be matched.

@wojpawlik wojpawlik linked a pull request Dec 31, 2024 that will close this issue
@wojpawlik wojpawlik linked a pull request Dec 31, 2024 that will close this issue
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