【发布时间】:2022-05-05 09:29:33
【问题描述】:
我正在尝试创建一个接受字符串作为位置参数的 discord.py 命令。
如何接受 Discord 消息中的字符串(以及,通过扩展,布尔值和整数)作为参数?
示例代码
# -- snip --
@bot.command()
async def echo(ctx):
"""
Example command to return the input of this command.
"""
# argument name should be called `arg`
await ctx.respond(arg)
【问题讨论】:
标签: python discord.py arguments