NOTE: at this point of development this bot is suitable only for experienced users. Some of the documentation below may be deprecated or otherwise lacking.
A lightweight moderator bot with anti spam capabilities. Can be used as a simple anti spam bot without any extra features.
Do note: source code above is work in progress for the next build. See releases if you'd like to download a working copy.
-
Node.js version 6 or higher installed.
-
NPM (should come with the Node).
-
Registered Discord application. Must be registered as a client.
-
See releases and download the newest version. Extract the package.
-
Create
auth.json
file into<extracted package>/config
dir. On windows, make sure your file extensions are not hidden (default), otherwise you'll end up having e.g.auth.json.txt
instead ofauth.json
. -
Input your application credentials into the
auth.json
file. See the syntax below.
{
"token": "Your app's token.",
"id": "Your app's client id.",
"owner": "Your own discord id."
}
-
With a command prompt or such, navigate to the project folder. E.g. on windows:
cd c:/git/tunnelerjs
. Make sure the path becomes active. If your drive letter is something else than c, try inputting the letter after the cd-command:c:
. -
Enter
npm install
. This will download all the required 3rd party components, like Discord.js. -
From now on you can start the bot with a
node tunneler
command. Remember, you can also create a .bat file for the startup process. -
Invite the bot to your servers via a regular web browser. Use the following url:
https://discordapp.com/oauth2/authorize?&client_id=YOUR_APP_CLIENT_ID_HERE&scope=bot&permissions=0
. ReplaceYOUR_APP_CLIENT_ID_HERE
with the application id of the bot.
You can also script your own custom commands. Here's how you can integrate them with the bot:
-
Add your script into
/commands
dir. Please see the correct syntax from the other command files. -
Add your command into command mapping
/config/commands.json
. The key is the command word inputted by a client, the value is the actual mapped command script. For examplemodule.inc.about
turns intoabout
. You can have multiple command words for a single command script. -
Register your command in
tunneler.js
,const commands
. There should be sufficient amount of examples present. -
Reboot the bot and you are done.