Answer the question
In order to leave comments, you need to log in
How to fix sending a random picture?
Please tell me what is wrong.
I wrote a code that is supposed to send a random image, but I can't figure out what the problem is. I'm still pynood.
Thank you.
my_img = [
discord.File('...'), # 1 картинка
discord.File('...') # 2 картинка
]
@client.command()
async def test(ctx):
await ctx.send(files= random.choice(my_img))
Answer the question
In order to leave comments, you need to log in
Most likely files takes a list based on the 's at the end.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question