【发布时间】:2019-02-20 04:24:08
【问题描述】:
@bot.command(pass_context=True)
async def coinflip(ctx):
variable = [
"head",
"tail",]
await bot.say(ctx.message.channel, "{}".format(random.choice(variable)))
Python 说“随机”没有定义,如何解决这个问题
【问题讨论】:
-
导入模块。
标签: python bots discord discord.py