Fix redeem command parsing: handle /redeem and multiline keys correctly#28
Fix redeem command parsing: handle /redeem and multiline keys correctly#28PvlMamaev wants to merge 1 commit intodmcallejo:masterfrom
Conversation
|
Hello! Thank you for taking your time and submit a PR. I was not aware of these issues. |
|
Hi! I’d like to withdraw this pull request for now. After further testing, I realized that the original /redeem and !redeem commands do in fact work correctly under certain conditions. It seems the issue I was experiencing may have been related to my server environment, not the bot logic itself. At this point, I cannot confidently say that the changes in this PR are necessary or beneficial. I will continue investigating the environment-specific issues on my side and might submit a more focused improvement in the future if needed. Thanks again for your time and understanding! |
|
Thank you for your time anyway! |
This pull request fixes an issue where the
/redeemcommand was not working properly due to incorrect key parsing and command matching logic.Changes introduced:
_normalize_keys()to correctly extract CD-keys (5-5-5 format), even from multiline messages or with unusual formatting./instead of!, which previously caused crashes.set(_REGEX_CDKEY.findall(...))logic with more robust normalization that avoids assertion errors inASFConnector.Tested locally with both
/redeemand!redeemcommands — now works as expected.Let me know if anything needs to be adjusted!