refactor(bot): ♻️ Change custom is_owner() for @commands.is_owner().
This commit is contained in:
+3
-3
@@ -14,7 +14,6 @@ from payphone.core import constants, exceptions, formatting, help_command, confi
|
||||
from payphone.core.redis import redis
|
||||
|
||||
|
||||
# TODO: Make it an AutoShardedBot on production.
|
||||
class Payphone(commands.AutoShardedBot):
|
||||
def __init__(self) -> None:
|
||||
intents = discord.Intents.default()
|
||||
@@ -30,6 +29,7 @@ class Payphone(commands.AutoShardedBot):
|
||||
help_command=help_command.HelpCommand(),
|
||||
strip_after_prefix=True,
|
||||
case_insensitive=True,
|
||||
owner_ids=[898569996949676052, 777338793803513886],
|
||||
)
|
||||
|
||||
async def on_ready(self) -> None:
|
||||
@@ -146,7 +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
|
||||
report_id: int | None = None,
|
||||
) -> models.Ban:
|
||||
"""Bans a user from Payphone.
|
||||
|
||||
@@ -200,7 +200,7 @@ class Payphone(commands.AutoShardedBot):
|
||||
reason=reason,
|
||||
expires_at=until,
|
||||
banned_by_id=mod_id,
|
||||
report_id=report_id
|
||||
report_id=report_id,
|
||||
)
|
||||
|
||||
await redis.set(key, "1", ex=300)
|
||||
|
||||
Reference in New Issue
Block a user