Temporary group vcs and a bunch of fixes
This commit is contained in:
@@ -15,3 +15,10 @@ def find_category(guild: discord.Guild, group: str) -> Optional[discord.Category
|
||||
if cat.name.lower() == group:
|
||||
return cat
|
||||
return None
|
||||
|
||||
|
||||
async def find_role_case_insensitive(guild: discord.Guild, name: str, prefix: str = '') -> Optional[discord.Role]:
|
||||
for role in await guild.fetch_roles():
|
||||
if name.strip().lower() == role.name[len(prefix):].lower():
|
||||
return role
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user