Tell the user why they were banned

This commit is contained in:
Nexus 2023-02-23 16:07:15 +00:00
parent 09991dcefd
commit 612cf9cf70
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -79,7 +79,10 @@ async def check_not_banned(ctx: discord.ApplicationContext | commands.Context):
else: else:
reply = ctx.reply if isinstance(ctx, commands.Context) else ctx.respond reply = ctx.reply if isinstance(ctx, commands.Context) else ctx.respond
try: try:
await reply(content=f":x: You can use commands {discord.utils.format_dt(dt, 'R')}") await reply(
content=f":x: You can use commands {discord.utils.format_dt(dt, 'R')} (reason for ban:"
f" {ban.reason}).",
)
except discord.HTTPException: except discord.HTTPException:
pass pass
finally: finally: