osu.py 文件源码

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

项目:pcbot 作者: pckv 项目源码 文件源码
def notify(message: discord.Message, mode: UpdateModes.get_mode):
    """ Sets the command executor's update notification mode. This changes
    how much text is in each update, or if you want to disable them completely.

    Update modes are: `{modes}`. """
    assert message.author.id in osu_config.data["profiles"], \
        "No osu! profile assigned to **{}**!".format(message.author.name)

    osu_config.data["update_mode"][message.author.id] = mode.name
    osu_config.save()

    # Clear the scores when disabling mode
    if message.author.id in osu_tracking and mode == UpdateModes.Disabled:
        del osu_tracking[message.author.id]

    await client.say(message, "Set your update notification mode to **{}**.".format(mode.name.lower()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号