ezelkow1/discord-key-bot

Better Regex handling

Closed this issue · 2 comments

The current regex just takes everything after the last space as a key. While this is nice to be generic since it handles urls and keys there could be more. I.e. separate regex to determine steam/uplay/origin/gog/url, label as appropriate. This could also allow multiple key additions in one message

Something else to add when working on this. If we know that its a steam key, generate a link to the key redemption page

https://store.steampowered.com/account/registerkey?key=KEY-GOES-HERE

GOG key format : XXXXX-XXXXX-XXXXX-XXXXX
steam key: xxxxx-xxxxx-xxxxx or xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
ps3: xxxx-xxxx-xxxx
uplay: xxxx-xxxx-xxxx-xxxx or xxx-xxxx-xxxx-xxxx-xxxx
origin - xxxx-xxxx-xxxx-xxxx-xxxx