Zephyrus
Zephyrus

Reputation: 45

Discord.py input convert to int()

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'

Upvotes: 1

Views: 597

Answers (1)

Kartik Shandilya
Kartik Shandilya

Reputation: 3924

Here's how you can convert it to int -

# Convert the input to an integer
result = int(input.content)

Upvotes: 1

Related Questions