lib.py 文件源码

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

项目:PomodoroBot 作者: VicenteRD 项目源码 文件源码
def author_has_role(context: commands.Context, role_id: str) -> bool:
    """ Checks within a command's authors roles for one that has a matching ID
        to the one given.

    :param context: The context in which the command was sent.
    :type context: discord.ext.commands.Context

    :param role_id: The ID of a role to check for.
    :type role_id: str

    :return: True if the author has a role with the given ID, false otherwise.
    """

    return has_role(context.message.author, role_id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号