def raid_off(self, ctx):
"""Disables raid mode on the server.
When disabled, the server verification levels are set
back to Low levels and the bot will stop broadcasting
join messages.
"""
try:
await ctx.guild.edit(verification_level=discord.VerificationLevel.low)
except discord.HTTPException:
await ctx.send('\N{WARNING SIGN} Could not set verification level.')
query = """INSERT INTO guild_mod_config (id, raid_mode, broadcast_channel)
VALUES ($1, $2, NULL) ON CONFLICT (id)
DO UPDATE SET
raid_mode = EXCLUDED.raid_mode,
broadcast_channel = NULL;
"""
await ctx.db.execute(query, ctx.guild.id, RaidMode.off.value)
self._recently_kicked.pop(ctx.guild.id, None)
await ctx.send('Raid mode disabled. No longer broadcasting join messages.')
评论列表
文章目录