A discord bot, built on top of discord.js & stripe.
This bot has few commands. Here are the highlights:
?store
-> Display the channel access store.?id
-> Display your discord id to specify while purchasing.?info
-> Display info relative to the bot.?help
-> Help you to use the bot.
?staff-add <@user/userId>
-> Give the specified user moderation privileges.?staff-remove <@user/userId>>
-> Remove the specified user moderation privileges.?private-channel-set <Price>
-> Set the channel as private for the specified amount of $USD.?private-channel-remove
-> Set back the channel as public.?channel-info:
-> Show some channel information.
?help
-> Lists all commands or just help for one command.
This bot runs on node.js. You will need at least node 12.
Install node 12 or newer,
Run npm install
in the bot directory and make sure it passes.
Now set up your config.json
and run npm start
or node index.js
in ./src
to test the bot out!
- Install node.js
- Run
npm install
and make sure it succeeds - Set up your
config.json
- Run
npm start
ornode index.js
in./src
to test the bot out! - Run
npm start
ornode server.js
in./src
to run the server as localhost
Before the first run you will need to modify the config.json
in ./src
. A bot token is required. Stripe tokens are also required. If you want to change the bot prefix, change the row "prefix": "chosen prefix"
.
Please see this excellent guide for how to create your discord bot's account and get your bot token.
Verify that the bot runs with your config by running npm start
.
Once you've setup your keys and checked that the features you want are working, you have a couple of options for running the bot.
You could run the bot along side everything else on your pc. However it's probably a good idea to run your bot on a separate computer such as a linux server or a Raspberry Pi so it does not interfere with your normal operations and to keep it running even if you were to sleep or shutdown your PC.
There is a number of cloud hosting providers that can run small node.js applications like this. The following have been tested to work, you'll have to extrapolate if you want to use some other provider (AWS, etc)
- Create heroku account, install heroku-cli, create a new Dyno.
- Git clone the repo and follow the instructions in the Deploy section to setup pushing to heroku
- Go to settings and setup Config Vars the name of the vars are exactly the same as the config.json file. You DO NOT need the quotes around the values in config vars
- Run
heroku scale worker=1
in the bot installation directory to run the bot as a worker rather than a webserver. - SOME COMMANDS ARE NOT WORKING, I AM WORKING TO FIX THIS.
Please check the GitHub issues page on this project. We get a lot of similar questions, and it is likely that yours has already been answered.
If you still need help, feel free to join us on Discord.