def is_bot_collection(bot: Dogbot, guild: discord.Guild) -> bool:
"""Returns a bool indicating whether a guild is a collection."""
if await is_blacklisted(bot, guild.id):
return True
# keywords in the guild name
if any(keyword in guild.name.lower() for keyword in ('bot collection', 'bot hell')):
return True
# special guilds that shouldn't be classified as a bot collection
if guild.id in WHITELISTED_GUILDS:
return False
# ratio too big!
if user_to_bot_ratio(guild) >= UTBR_MAXIMUM:
return True
return False
评论列表
文章目录