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