Discord utils: to_string: added case for roles

This commit is contained in:
Elnath 2021-04-20 18:05:07 +02:00
parent f474205462
commit 938aa6df69
1 changed files with 5 additions and 0 deletions

View File

@ -65,3 +65,8 @@ def _(guild) -> str:
@to_string.register(discord.CategoryChannel) @to_string.register(discord.CategoryChannel)
def _(channel) -> str: def _(channel) -> str:
return f"{channel.name}({channel.id})" return f"{channel.name}({channel.id})"
@to_string.register(discord.Role)
def _(role) -> str:
return f"@{role.name}({role.id})"