【发布时间】:2018-03-10 20:08:11
【问题描述】:
我一直试图弄清楚如何跟踪用户使用命令的次数。我希望能够在每次键入命令时递增并显示他们使用命令的次数。 这是我的一个命令的一些代码: 忽略选择语句
@client.command(pass_context=True)
async def pick(ctx):
author = ctx.message.author.id
if 1 <= giftRate <= 2:
if (1 <= lowFishRange <= 20):
oneto5 = str(5)
await client.say("<@%s>" % (author) + " recived " + oneto5 + "
fish")
else:
oneto5 = str(1)
await client.say("<@%s>" % (author) + " recived " + oneto5 + "
fish")
else:
await client.say("<@%s>" % (author) + " seemed to have missed the mark, the only way to gurantee fish is by "
"waiting for a cool pant cate to give you some.")
【问题讨论】:
标签: python-3.x discord discord.py