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()))
评论列表
文章目录