I am trying to build up discord bot through pip discord.py. After command !random I want to ask user for any number and bot will then generate random number between 0 and entered number. It doesn't rly work for me and because i don't know much things about discord.py, I ask there :)
code:
import random
elif message.content.startswith("!random"):
await client.send_message(message.channel, "Enter a number: ")
num = await client.wait_for_message(int)
numm = int(num)
randomnum = random.randint(0, numm)
await client.send_message(message.channel, randomnum)
Aucun commentaire:
Enregistrer un commentaire