Ask coding questions

← Back to all posts
How can I make a Discord quiz
JamesWyatt

I've got the code below but I just wanted to know why the answer is not working. When I run the code on replit and type the command on discord, it doesn't do anything.

Code:

Voters
JamesWyatt
Comments
hotnewtop
ryanbrwr

Do you have the whole file for the bot? If this is the only code you're running, you need to start the discord bot with a bot.on('message') or something like that. Here's a link to a tutorial on hosting discord bots on replit, hope it helps! https://www.freecodecamp.org/news/create-a-discord-bot-with-python/

JamesWyatt

@ryanbrwr Yes, I have a whole file. I'll check out the link but thanks.