botcollection.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:dogbot 作者: slice 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号