Back in the day (before 1.7), discord.py used to allow hexes without a prefix (like, for example, FF0800), and it would parse just fine. This feature was never documented, per se, but it worked. This commit changed all of that, making it so either a # or a 0x was required due to a rewrite in the logic of the conversion.
This PR attempts to allow hexes without a prefix to work again. Not sure if it should have a versionchanged or this is a great idea - let me know if there's anything wrong with this PR! Admittedly, the change is somewhat hacky anyways.
Checklist
If code changes were made then they have been tested.
I have updated the documentation to reflect the changes.
This PR fixes an issue.
This PR adds something new (e.g. new method or parameters).
This PR is a breaking change (e.g. methods or parameters removed/renamed)
This PR is not a code change (e.g. documentation, README, ...)
## Summary
Back in the day (before 1.7), discord.py used to allow hexes without a prefix (like, for example, `FF0800`), and it would parse just fine. This feature was never *documented*, per se, but it worked.
[This commit](https://github.com/Rapptz/discord.py/commit/a0404807d5e20ad6a5fae52e5d3a51cbba8e0c63) changed all of that, making it so either a `#` or a `0x` was required due to a rewrite in the logic of the conversion.
This PR attempts to allow hexes without a prefix to work again. Not sure if it should have a `versionchanged` or this is a great idea - let me know if there's anything wrong with this PR! Admittedly, the change is somewhat hacky anyways.
## Checklist
<!-- Put an x inside [ ] to check it, like so: [x] -->
- [x] If code changes were made then they have been tested.
- [x] I have updated the documentation to reflect the changes.
- [ ] This PR fixes an issue.
- [ ] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is **not** a code change (e.g. documentation, README, ...)
IAmTomahawkx
(Migrated from github.com)
approved these changes 2021-09-04 04:53:11 +00:00
IAmTomahawkx
(Migrated from github.com)
left a comment
Copy Link
Copy Source
Seems fine to me, thanks
Seems fine to me, thanks
This pull request has changes conflicting with the target branch.
discord/ext/commands/converter.py
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Back in the day (before 1.7), discord.py used to allow hexes without a prefix (like, for example,
FF0800), and it would parse just fine. This feature was never documented, per se, but it worked.This commit changed all of that, making it so either a
#or a0xwas required due to a rewrite in the logic of the conversion.This PR attempts to allow hexes without a prefix to work again. Not sure if it should have a
versionchangedor this is a great idea - let me know if there's anything wrong with this PR! Admittedly, the change is somewhat hacky anyways.Checklist
Seems fine to me, thanks
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.