diff --git a/tux/cogs/info/info.py b/tux/cogs/info/info.py index 3f5383ec3..96999a7b1 100644 --- a/tux/cogs/info/info.py +++ b/tux/cogs/info/info.py @@ -107,6 +107,58 @@ async def member(self, interaction: discord.Interaction, member: discord.Member) await interaction.response.send_message(embed=embed) + @info.command(name="roles", description="Lists all roles in the server.") + async def roles(self, interaction: discord.Interaction) -> None: + """ + List all roles in the server. + + Parameters + ---------- + interaction : discord.Interaction + The discord interaction object. + """ + if not interaction.guild: + return + + guild = interaction.guild + roles = [role.mention for role in guild.roles] + + embed = EmbedCreator.create_info_embed( + title="Server Roles", + description=f"Role list for {guild.name}", + interaction=interaction, + ) + + embed.add_field(name="Roles", value=", ".join(roles), inline=False) + + await interaction.response.send_message(embed=embed) + + @info.command(name="emotes", description="Lists all emotes in the server.") + async def emotes(self, interaction: discord.Interaction) -> None: + """ + List all emotes in the server. + + Parameters + ---------- + interaction : discord.Interaction + The discord interaction object. + """ + if not interaction.guild: + return + + guild = interaction.guild + emotes = [str(emote) for emote in guild.emojis] + + embed = EmbedCreator.create_info_embed( + title="Server Emotes", + description=f"Emote list for {guild.name}", + interaction=interaction, + ) + + embed.add_field(name="Emotes", value=" ".join(emotes) if emotes else "No emotes available", inline=False) + + await interaction.response.send_message(embed=embed) + async def setup(bot: commands.Bot) -> None: await bot.add_cog(Info(bot))