【发布时间】:2018-07-07 05:08:41
【问题描述】:
所以我有这个命令,它允许用户更改游戏,它运行良好,但我对其设置了 15 秒的冷却时间,它也运行良好,但我的问题是让它显示一条消息,表明你正在冷却句点或如果命令已成功执行。我是 python 新手,这可能是一个简单的修复,所以我很抱歉浪费你的时间,但提前谢谢
我的代码:
@client.command(name="status")
@commands.cooldown(1, 15, commands.BucketType.server)
async def client_status(*, status: str = None):
"""Change the bot's 'playing' status.
Running this command without any arguments will turn the 'playing' status off'
"""
game = Game(name=status)
await client.change_presence(game=game)
【问题讨论】: