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(command parser): add regexPrefix client option #145

Merged
merged 9 commits into from
Jan 30, 2021

Conversation

favna
Copy link
Member

@favna favna commented Jan 30, 2021

Features

  • Add regexPrefix client option

⚠ BREAKING CHANGES

  • The events prefixedMessage, unknownCommandName, and unknownCommand 3rd
    parameter now have the type string | RegExp
  • CommandContext.prefix now has the type string | RegExp

With a `regexPrefix` you can have a natural language prefix for your bot

BREAKING CHANGE: The events `prefixedMessage`, `unknownCommandName`, and `unknownCommand` 3rd
parameter now have the type `string | RegExp`
BREAKING CHANGE: `CommandContext.prefix` now has the type `string | RegExp`
@favna favna requested a review from kyranet as a code owner January 30, 2021 02:26
@favna favna requested review from vladfrangu and a team January 30, 2021 02:26
src/lib/SapphireClient.ts Outdated Show resolved Hide resolved
src/lib/SapphireClient.ts Outdated Show resolved Hide resolved
src/lib/SapphireClient.ts Outdated Show resolved Hide resolved
src/lib/SapphireClient.ts Outdated Show resolved Hide resolved
src/events/command-handler/CorePrefixedMessage.ts Outdated Show resolved Hide resolved
favna and others added 5 commits January 30, 2021 10:10
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
kyranet
kyranet previously approved these changes Jan 30, 2021
src/events/command-handler/CoreMessageParser.ts Outdated Show resolved Hide resolved
favna and others added 2 commits January 30, 2021 16:24
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
@kyranet kyranet merged commit e7d982e into main Jan 30, 2021
@kyranet kyranet deleted the feat/regex-prefixes branch January 30, 2021 16:11
favna added a commit that referenced this pull request Feb 1, 2021
With a `regexPrefix` you can have a natural language prefix for your bot

Co-authored-by: Antonio Román <kyradiscord@gmail.com>

BREAKING CHANGE: The events `prefixedMessage`, `unknownCommandName`, and `unknownCommand` 3rd
parameter now have the type `string | RegExp`
BREAKING CHANGE: `CommandContext.prefix` now has the type `string | RegExp`
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 this pull request may close these issues.

3 participants