The problem I'm having is that I'm trying to make a python discord bot that tells jokes, and one of the jokes will have an image instead of letters. All of my string variables are in a list, which are picked randomly with the random function in python, so I wanna figure out how to make it so the image is picked randomly from them. Heres my list:
joke_list = [first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh,twelvth, thirteenth, fourteenth, fifteenth, sixteenth, seventeenth, eighteenth, nineteenth, twentieth, twentyfirst, twentysecond, twentythird, twentyfourth, twentyfifth, twentysixth, twentyseventh, twentyeighth, twentyninth, thirtieth, thirtyone, thirtytwo, thirtythree, thirtyfour, thirtyfive]
and this
if message.content.startswith('tell me a joke'):
await message.channel.send(random.choice(joke_list))
Aucun commentaire:
Enregistrer un commentaire