tfjm-discord-bot/src/utils.py

5 lines
150 B
Python
Raw Normal View History

2020-04-29 14:27:40 +00:00
def has_role(member, role: str):
"""Return whether the member has a role with this name."""
return any(r.name == role for r in member.roles)