N
N
NiicKz2020-08-20 20:13:15
Python
NiicKz, 2020-08-20 20:13:15

How to send a random GIF?

I'm trying to make the bot send a random gif, but it only sends a couple of types gif.com/gif01gif.com/gif02gif.com/gif03gif.com/gif04 and it sends not an image and not a random

code:

import random;

gif = [
      "гиф.ком/гиф01"
      "гиф.ком/гиф02"
      "гиф.ком/гиф03"
      "гиф.ком/гиф04"
]

@bot.command() 
async def гиф(ctx): 
    author = ctx.message.author

    await ctx.send(random.choice(gif))


I apologize for not writing normal gif links

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2020-08-20
@NiicKz

List items must be separated by a comma

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question