how can i convert input to int() on discord?
Example:
input = await bot.wait_for("message")
i was try to did convert like int(answer)
Thanks.
Edit: Getting error TypeError: int() argument must be a string, a bytes-like object or a real number, not 'Message'
Here's how you can convert it to int -
# Convert the input to an integer
result = int(input.content)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.