Add a cooldown to stats

This commit is contained in:
Nexus 2023-02-24 10:31:32 +00:00
parent 7d6214a88a
commit f1b28a528f
Signed by: nex
GPG key ID: 0FA334385D0B689F
2 changed files with 2 additions and 1 deletions

View file

@ -151,7 +151,6 @@ class Events(commands.Cog):
G_EMOJI = "\U0001f3f3\U0000fe0f\U0000200d\U0001f308"
N_EMOJI = "\U0001f922"
C_EMOJI = "\U0000271d\U0000fe0f"
# if is_naus or re.match(rf"(trans(gender)?|{T_EMOJI}|femboy)\b", message.content.lower()):
if any((x in message.content.lower() for x in ("trans", T_EMOJI, "femboy"))) or is_naus:
try:
await message.add_reaction(N_EMOJI)

View file

@ -263,6 +263,8 @@ class UptimeCompetition(commands.Cog):
uptime = discord.SlashCommandGroup("uptime", "Commands for the uptime competition.")
@uptime.command(name="stats")
@commands.max_concurrency(1, commands.BucketType.user, wait=True)
@commands.cooldown(1, 10, commands.BucketType.user)
async def stats(
self,
ctx: discord.ApplicationContext,