P
P
pt3n4ik2020-11-26 16:51:49
Python
pt3n4ik, 2020-11-26 16:51:49

I want the discord bot (print command, send the line that I wanted) how to do it?

The story is this , I want the bot to answer with numbers, and not with the word "random". Example:random = print(random.randint(1,100))

@Bot.command(pass_context=True)
async def рандом(ctx):
  await ctx.send(random)

Instead of answering with any number, he replies: "
spoiler
random
"
5fbfb298aaf35538169495.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-11-26
@pt3n4ik

First, before doing anything, you need to learn the basics
. Second, what is print for? Remove Third, naming variables the same with the module is not a good idea random = print(random.randint(1,100))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question