feat(shard): ✨ Add command aliases for p.bans and p.reports and add permission checking to commands before execution.
This commit is contained in:
@@ -150,7 +150,7 @@ class Admin(base.Cog):
|
|||||||
else:
|
else:
|
||||||
await ctx.send(f"Removed the Supporter role from <@{user.id}>.")
|
await ctx.send(f"Removed the Supporter role from <@{user.id}>.")
|
||||||
|
|
||||||
@commands.command()
|
@commands.command(aliases=["rs"])
|
||||||
@checks.is_moderator()
|
@checks.is_moderator()
|
||||||
async def reports(self, ctx: commands.Context) -> None:
|
async def reports(self, ctx: commands.Context) -> None:
|
||||||
"""Shows the reports.
|
"""Shows the reports.
|
||||||
@@ -168,7 +168,7 @@ class Admin(base.Cog):
|
|||||||
embed=embeds.report_embed(report), view=views.ReportView(self.bot, report)
|
embed=embeds.report_embed(report), view=views.ReportView(self.bot, report)
|
||||||
)
|
)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command(aliases=["bs"])
|
||||||
@checks.is_moderator()
|
@checks.is_moderator()
|
||||||
async def bans(
|
async def bans(
|
||||||
self, ctx: commands.Context, user: discord.User | int | None = None
|
self, ctx: commands.Context, user: discord.User | int | None = None
|
||||||
|
|||||||
@@ -141,6 +141,10 @@ class Calls(base.Cog):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@commands.command(aliases=["m"])
|
@commands.command(aliases=["m"])
|
||||||
|
@commands.has_permissions(
|
||||||
|
send_messages=True,
|
||||||
|
use_external_emojis=True,
|
||||||
|
)
|
||||||
@checks.is_not_banned()
|
@checks.is_not_banned()
|
||||||
async def mask(self, ctx: commands.Context, toggle: bool | None = None) -> None:
|
async def mask(self, ctx: commands.Context, toggle: bool | None = None) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -178,6 +182,9 @@ class Calls(base.Cog):
|
|||||||
return await ctx.send(message)
|
return await ctx.send(message)
|
||||||
|
|
||||||
@commands.command(aliases=["r"])
|
@commands.command(aliases=["r"])
|
||||||
|
@commands.has_permissions(
|
||||||
|
send_messages=True,
|
||||||
|
)
|
||||||
@checks.is_not_banned()
|
@checks.is_not_banned()
|
||||||
async def report(self, ctx: commands.Context) -> None:
|
async def report(self, ctx: commands.Context) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user