A discord bot that allows you to have seamless management for your roleplay server. It has the basic barebones and will have fully-fledged custom integrations.
To test this discord bot on a server, please read through the documentation regarding the various commands @ https://github.com/tactordev/NightWatch/blob/main/COMMAND_USAGE.md. Then, join: https://discord.gg/ywug7WKW2X and you will be granted the Tester role. Each channel has information regarding which commands can be used and what they do.
To install the bot and run it locally (to either host it locally or to test it out), follows the steps below.
- Download the code by clicking on:
Code > Download ZIPto the top right of the code. OR Usegit clone https://github.com/tactordev/nightwatchin your terminal. OR Download the source code from theReleasestab. - Then enter the folder (
cd nightwatch). - Ensure you have NodeJS installed (https://nodejs.org/).
- Run
npm install. - For V1.0.1 and below: Ensure you fill in your
TOKENandclientIdin theconfig.json. All other fields will be populated on the first run ofindex.jsor when you run the/utility setupcommand. - For V1.0.2+: Ensure you have a .env with TOKEN and CLIENT_ID or a secrets file with this information.
- Run
node index.js. - Navigate to a server with your bot and experiment with the commands.
Follow Step 1 from the Local Installation and then follow instructions provided by your specific hosting provider for running NodeJS scripts.
The codebase is split into different folders for ease of use.
/assetsis used to store emojis for the bot. Any images with a.pngfile extension will automatically be loaded into the application's emoji store./commandsstores all the commands. Each command exports specific data and should be self-explanatory. There are 3 types: slash commands, prefix commands and subcommands. Subcommands are named after the directory they fall under and the name provided in their export./dataholds config files for data stored by the bot. Self-explanatory./utilsholds utilities such as accessing emojis, using text coloring in the console, saving data, etc.
If you wish to add commands in the future, you shouldn't need to touch index.js. Simply follows the format of a command using the same command as yours and fill in the data and async execute with your logic flow.
Made with love by Tactor. ❤️