Utility bot created for Clash of Clans to support stat tracking within the discord server.
Directions on creating an app and getting credentials may be found here.
Invite your bot to your server, make sure you select the bot
and applications.commands
options while creating the invite.
Get your Clash of Clans API Token from here.
Setting up the bot will require basic knowledge in Javascript, MongoDB and Discord bot development.
-
Clone this repository
-
Make a copy of
.env.copy
and rename it to.env
. Fill in your Discord Token, your Mongo_URI and your Clash Token. Make sure you include Bearer before your clash token like"Bearer eyJ0eXAiOiJKV..."
-
Make a copy of the
config.json.copy
file and rename it toconfig.json
. Then go to theconfig.json
file and change all the ids to ids in your server.
Install all the dependencies using
npm install
Register slash commands to a single guild by running
node deploy-commands.js
You only need to run node deploy-commands.js
once. You should only run it again if you add or edit existing commands
Finally start the application using
node index
and hopefully everything works right :)