K
K
kirito12020-05-10 20:27:31
Python
kirito1, 2020-05-10 20:27:31

How to send a random picture using Discord.py?

I want my bot to send a random image from the changes on the !image command.

How to do it? Write full code please!

And I apologize right away, I'm new to Python.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Deleting Account, 2020-05-10
@kirito1

Use the random module .

import random 


imgs = [
      "img_url",
      "img_url"
]

your_bot.send(random.choice(imgs))

D
Dmitry, 2013-12-05
@omun

For that kind of money, I would suggest the MSI GT line. I don't know how to argue, I just urge you to pay attention. SSD in them is often out of the box. If not, then replacing is not a problem.
From personal: My laptop from MSI for a year and a half did not bring me any problems.

Y
Yuri Denisov, 2013-12-05
@denissov

also look at hp and dell, you can take hp for 40-45 rubles and buy an ssd.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question