Refactor command definitions in owner and moderation cogs for consistency. Change getinvite command to a regular command and update type hints for parameters in enlarge and roleicon commands to improve clarity and type safety.
Some checks failed
CI / Bot (Python) (push) Successful in 12s
CI / Dashboard (Next.js) (push) Failing after 8s

This commit is contained in:
TheOnlyMace
2026-07-21 22:47:29 +02:00
parent 299351463c
commit 20193404e8
3 changed files with 5 additions and 5 deletions

View File

@@ -119,7 +119,7 @@ class Moderation(commands.Cog):
@blacklist_check()
@ignore_check()
@commands.cooldown(1, 3, commands.BucketType.user)
async def enlarge(self, ctx, emoji: Union[discord.Emoji, discord.PartialEmoji, str]):
async def enlarge(self, ctx, emoji: str):
url = emoji.url
await ctx.send(url)
@@ -870,7 +870,7 @@ class Moderation(commands.Cog):
@commands.cooldown(1, 3, commands.BucketType.user)
@commands.has_permissions(administrator=True)
@commands.bot_has_guild_permissions(manage_roles=True)
async def roleicon(self, ctx: commands.Context, role: discord.Role, *, icon: Union[discord.Emoji, discord.PartialEmoji, str] = None):
async def roleicon(self, ctx: commands.Context, role: discord.Role, *, icon: str = None):
if role.position >= ctx.guild.me.top_role.position:
error_embed = discord.Embed(