Keegry
Keegry

Reputation: 33

Trying to get my discord bot to take a message as number input

   await message.channel.send("please input the radius of the circle")
   alg(int(message.content()))
   await message.channel.send(alg) 

every time I input a number after the first message I get the below error.

File "main.py", line 138, in on_message
    alg(int(message.content()))
TypeError: 'str' object is not callable```

Upvotes: 0

Views: 105

Answers (1)

Łukasz Kwieciński
Łukasz Kwieciński

Reputation: 15689

Message.content is an attribute, not a method - means it shouldn't be called (remove the parenthesis)

int(message.content)

Upvotes: 3

Related Questions