Trying to fix this myself
This commit is contained in:
parent
7af26db001
commit
7653e386aa
@ -29,14 +29,17 @@ class Recruitment(commands.Cog):
|
||||
self.antispam = {}
|
||||
|
||||
async def cog_check(self, ctx: commands.Context):
|
||||
if ctx.guild.id not in self.antispam:
|
||||
self.antispam[ctx.guild.id] = AntiSpam([(5, 5), (30, 10), (300, 20)])
|
||||
guild_id = ctx.guild.id
|
||||
if guild_id not in self.antispam:
|
||||
self.antispam[guild_id] = AntiSpam([(5, 5), (30, 10), (300, 20)])
|
||||
|
||||
if self.antispam[ctx.guild.id].spammy(ctx=ctx):
|
||||
antispam = self.antispam[guild_id]
|
||||
if antispam.spammy(ctx):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@commands.guild_only()
|
||||
@checks.admin_or_permissions(manage_guild=True)
|
||||
@commands.group(name="setapplicationschannel", pass_context=True, no_pm=True)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user