A wheel of names bot build with discord.js
This bot generates a dynamic spin wheel gif with the options specified as arguments. It uses the canvas
and gifencoder
packages to create the spin wheel GIF.
- Install the packages with npm install.
- Get your Discord bot token and configure it in your server. Configure the bot with
MESSAGE CONTENT INTENT
andSend Message
permission. - To start the bot use:
TOKEN=yourtoken yarn start
orTOKEN=yourtoken yarn dev
if you need hot reload.
-
!pick: this command creates the spin wheel with the options passed as arguments separated by commas.
Example: !pick option1,option2,option3,option4
The Discord API does not allow to modify the files embedded in a message, so it is necessary to delete and send another message. This produces a strange effect, but it works 😄