feat(bot): ✨ Notify the reporter when their report has been accepted.

This commit is contained in:
Nyeki.py
2024-10-19 23:46:50 -03:00
parent 92468b83fe
commit f34bd29cfc
3 changed files with 38 additions and 5 deletions
+3
View File
@@ -146,6 +146,7 @@ class Payphone(commands.AutoShardedBot):
duration: timedelta | None,
reason: str,
moderator: discord.User | discord.Member | models.User | int | None = None,
report_id: int | None = None
) -> models.Ban:
"""Bans a user from Payphone.
@@ -155,6 +156,7 @@ class Payphone(commands.AutoShardedBot):
reason (str): The reason of the ban.
moderator (discord.User | discord.Member | models.User | int | None, optional): The
moderator who performed the action.
report_id (int | None, optional): The ID of the report the ban is related to.
Returns:
models.Ban: The newly created ban.
@@ -198,6 +200,7 @@ class Payphone(commands.AutoShardedBot):
reason=reason,
expires_at=until,
banned_by_id=mod_id,
report_id=report_id
)
await redis.set(key, "1", ex=300)