fiffu / arisa2

Very soft Discord bot
5 stars 5 forks source link

role tracking #16

Closed mylesonine closed 4 years ago

mylesonine commented 4 years ago

this probably works

fiffu commented 4 years ago

You're missing an r as a raw-string marker for the match pattern, or you can change the \d to \\d

fiffu commented 4 years ago

Just checked your changes again; get_role() would return any role in the format .#\d, meaning "A#1" would return true for any user. That doesn't seem right.

fiffu commented 4 years ago

I can see the motivation for the change because users can edit their username, but if they do then they can still !col and "get back into the loop", it's just mutate wouldn't work.

Aside: the database used for cooldown checking relies on userid (pretty sure these can't be changed on-demand), so users who change their username can't get free rolls from the system.

fiffu commented 4 years ago

Sorry for the force-push, I accidentally used the wrong email. Anyway, I moved some code around on my master branch, so I updated + fast-forwarded the code here. The changes you made to cogs/colours/__init__.py were moved to cogs/colours/cog.py