bot.py 文件源码

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

项目:discord-raid-coordinator 作者: dandesousa 项目源码 文件源码
def is_expired(message):
    """Determines if a raid is expired, given its announcement message.

    Message accepts the result returned by get_announcement_message (a valid obj or None).

    :param message discord.Message: The announcement message associated with the raid.
    :returns: True if the message/raid timestamp is expired
    """
    if message is None:
        return True  # can't find message, clean up the raid channel
    return (datetime.utcnow() - message.timestamp) > timedelta(seconds=settings.raid_duration_seconds)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号