[英]Discord.py input convert to int()
如何在 discord 上将输入转换为 int()?
例子:
input = await bot.wait_for("message")
我试着像int(answer)
那样转换
谢谢。
编辑:获取错误TypeError: int() argument must be a string, a bytes-like object or a real number, not 'Message'
这是将其转换为 int 的方法 -
# Convert the input to an integer
result = int(input.content)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.