Migrate a lot of things to slash commands

This commit is contained in:
2021-07-06 16:24:24 +02:00
parent f803693202
commit 57a7037ce9
3 changed files with 649 additions and 279 deletions

View File

@@ -22,3 +22,10 @@ async def find_role_case_insensitive(guild: discord.Guild, name: str, prefix: st
if name.strip().lower() == role.name[len(prefix):].lower():
return role
return None
def link_channel(channel: discord.abc.GuildChannel, italic: bool = False) -> str:
if italic:
return '[*' + channel.name + '*](https://discord.com/channels/' + str(channel.guild.id) + '/' + str(
channel.id) + ')'
return '[' + channel.name + '](https://discord.com/channels/' + str(channel.guild.id) + '/' + str(channel.id) + ')'