a discord.js bot
I'm currently learning javascript and this is my first (bigger) project. So the code I wrote is still really simple and not advanced. I followed the discord.js guide and decided that I wanted my own features. So I customized the commands to my own preferences. If you don't know discord.js and node.js - take a look at the guide. It was really helpful.
git clone git@github.com:m0rthe/diceroll.git
cd diceroll
npm install -g n
npm install discord.js
Use the discord developer portal, if you don't already have one. If you don't know how, use the guide .
After you're done, create a config.json file and copy your token
, bot Id
and server Id
into the config.json file.
node app.js
docker-compose up -d
You can choose to roll a
- d4
- d6
- d8
- d10
- d12
- d20
- d100
by using the command /rolldice {your choice}
which looks like this:
I may update the code in the future, when I get more knowledgeable and get new ideas.