Setting Up the Template
This guide assumes you have Visual Studio Code installed. You can use any code editor you like, but the instructions may be different for other editors.
Now that you have the prerequisites installed, we can start setting up the template. Open the code editor you've installed and open the terminal.
Navigate to the folder where you want to create your bot and clone the repository using Git or download it as a ZIP file and extract it to a folder.
Opening the Terminal
You can open the terminal in Visual Studio Code by going to View > Terminal or by using the keyboard shortcut Ctrl `.
Check to make sure you have Node.js and optionally Git installed by running the following commands in the terminal:
node --version
git --versionCloning the Repository
If you have Git installed, you can clone the repository using the following command:
git clone https://github.com/timeworn/stoatjs-bot-template
cd stoatjs-bot-templateIf you don't have Git installed, you can download the repository as a ZIP file from the GitHub page and extract it to a folder.
Installing Dependencies
Navigate to the project folder in the terminal and run the following command to install the dependencies:
npm installThis will install all the dependencies in the package.json file to the node_modules folder.
Renaming the files
The template comes with some example files that you need to fill out before you can start the bot.
- Rename the
.env.examplefile to.envand fill in theTOKENvariable with your bot token. You can get your bot token by following the instructions in the next section.