From 2885ce2d435c7b9d3cc31945edc3af6e89aa167f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 Mar 2023 19:55:12 +0100 Subject: [PATCH] ARGH!! --- recruitmentCog/recruitment.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/recruitmentCog/recruitment.py b/recruitmentCog/recruitment.py index 6a5b623..3d61146 100644 --- a/recruitmentCog/recruitment.py +++ b/recruitmentCog/recruitment.py @@ -31,16 +31,14 @@ class Recruitment(commands.Cog): async def cog_check(self, ctx: commands.Context): guild_id = ctx.guild.id if guild_id not in self.antispam: - self.antispam[guild_id] = AntiSpam([(5, 5), (30, 10), (300, 20)]) - + self.antispam[guild_id] = AntiSpam([(timedelta(seconds=5), 5), (timedelta(minutes=1), 10), (timedelta(minutes=5), 20), (timedelta(hours=1), 30), (timedelta(hours=24), 50)]) antispam = self.antispam[guild_id] - antispam.update(ctx) - if antispam.spam_count: + if antispam.spammy: + await ctx.send("Please wait a while before sending your application.") return False - + antispam.stamp() return True - @commands.guild_only() @checks.admin_or_permissions(manage_guild=True) @commands.group(name="setapplicationschannel", pass_context=True, no_pm=True)