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

Update validation regex for command names & options #1309

Merged
merged 3 commits into from May 4, 2022

Conversation

IlluminatiFish
Copy link
Contributor

@IlluminatiFish IlluminatiFish commented Apr 29, 2022

✨ Summary

Update validation regex for command names & options, to now support localized command names & options.
This is an adaptation of Discord's suggested Perl-like regex ^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$ as Python's re module does not support unicode character properties

📝 Checklist

  • If code changes were made then they have been tested.
  • This PR fixes an issue.
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)

Update validation regex for command names & options, to now support localized command names & options.
This is an adaptation of Discord's suggested Perl-like regex `^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$` as Python's re module does not support unicode character properties
@codecov
Copy link

codecov bot commented Apr 30, 2022

Codecov Report

Merging #1309 (99ebe2c) into master (fe5803f) will not change coverage.
The diff coverage is 0.00%.

❗ Current head 99ebe2c differs from pull request most recent head 61fa025. Consider uploading reports for the commit 61fa025 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1309   +/-   ##
=======================================
  Coverage   33.42%   33.42%           
=======================================
  Files          93       93           
  Lines       17606    17606           
=======================================
  Hits         5885     5885           
  Misses      11721    11721           
Flag Coverage Δ
pytest 33.42% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
discord/commands/core.py 17.75% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe5803f...61fa025. Read the comment docs.

@Middledot
Copy link
Member

The regex should also be put in the comment on line 1619, otherwise the regex seems to work

Update criteria comment as per @middleBot's suggestion
@IlluminatiFish
Copy link
Contributor Author

The regex should also be put in the comment on line 1619, otherwise the regex seems to work

There you go ;)

@plun1331 plun1331 added the status: awaiting review Awaiting review from a maintainer label May 4, 2022
@Lulalaby Lulalaby enabled auto-merge (squash) May 4, 2022 17:23
@Lulalaby Lulalaby merged commit ea6f59d into Pycord-Development:master May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting review Awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants