Skip to content
Sign upLog in
← Back to Community

Why is my bot not working?

Profile icon
Nithen

I have made a bot that sends images in Discord. But, when I type 'rpg!monsters' on Discord, an error occurs in line 26. Pls help me!

Voters
Profile icon
Nithen
Comments
hotnewtop
Profile icon
Coder100

Try making them local, so change line 7 to:

spawnables = ['./bootlegflowey.gif', './scaldamander.gif']

also please SEND YOUR ERROR!

Profile icon
Nithen

@Coder100
I have tried what you've given, but it's still not working. I'll give you the error--
2021-03-08

Profile icon
Coder100

oh lol you sent in the array not a random monster from it

spawn = random.choice(spawnables) await message.channel.send (file=discord.File (spawn))

@Nithen

Profile icon
Nithen

@Coder100
its working... but it's only showing one random monster. I want it to show all of the monsters on the list. Thanks anyways!