Discord.py input convert to int()

Question:

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'

Asked By: Zephyrus

||

Answers:

Here’s how you can convert it to int –

# Convert the input to an integer
result = int(input.content)
Answered By: Kartik Shandilya
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.