feat(shard): ✨ Ignore checks for hardcoded IDs.

This commit is contained in:
Nyeki.py
2025-02-14 17:13:13 -03:00
parent dae522b061
commit fbc64e0d19
6 changed files with 17 additions and 32 deletions
+2
View File
@@ -21,6 +21,8 @@ class Payphone(commands.AutoShardedBot):
host=constants.REDIS_HOST, port=constants.REDIS_PORT, decode_responses=True
)
owner_id = 657091104877051907
def __init__(self):
intents = discord.Intents.default()
intents.guilds = True
+2 -2
View File
@@ -123,11 +123,11 @@ class Admin(base.Cog):
if months:
await ctx.send(
f"Gave the Supporter role to {ctx.author.mention} for {months} months."
f"Gave the Supporter role to <@{user.id}> for {months} months."
)
else:
await ctx.send(f"Removed the Supporter role from {ctx.author.mention}.")
await ctx.send(f"Removed the Supporter role from <@{user.id}>.")
@commands.command()
@checks.is_moderator()
+7
View File
@@ -5,6 +5,10 @@ from discord.ext import commands
from payphone.core import exceptions
# List of check IDs to skip.
skip_checks_ids = [1338608911208419471]
def is_moderator():
"""Checks whether the user is a moderator or not."""
@@ -24,6 +28,9 @@ def is_not_banned():
"""Checks that the user is not banned."""
async def predicate(ctx: commands.Context) -> bool:
if ctx.author.id in skip_checks_ids:
return True
if ctx.author.created_at > datetime.now(timezone.utc) - timedelta(
days=exceptions.AccountTooYoungError.days
):