def has_role(member: discord.Member, role_id: str):
""" Checks if a member has a role with a specified ID.
:param member: The member to check.
:type member: discord.Member
:param role_id: The ID of the role to check for.
:type role_id: str
:return: True if the member has a role with the given ID, false otherwise
"""
for role in member.roles:
if role.id == role_id:
return True
return False
评论列表
文章目录