I am making a bot where if someone does !redeem <key>
it redeems their key.
However, if people put 2 spaces for example between !redeem
and their key
the bot does not work. Is it possible for regex to catch all spaces between !redeem
and the key
.
This is my current code
redeemkey = message.content.lower()
if redeemkey.startswith('!redeem'):
redeemkey = re.sub("!redeem ", "", redeemkey)