A bot to play snake on discord
Visual Studio Code with the following packages:
- ESLint
- Jest
- npm Intellisense
- Path Intellisense
- vscode-icons
If you already have NPM installed you can skip this section. You can check this by running node -v
and npm -v
in your terminal.
- Install Node.js
- Verify your installation was succesful by running
node -v
andnpm -v
in your terminal.
If you already have an SSH key for your development machine linked to your GitHub account you can skip this section.
- Open your terminal
- Navigate to the directory where you want the local copy of the repository to be stored
- Clone the repository by running
git clone [email protected]:ptlm500/discord-snake.git
- CD into
discord-snake
by runningcd discord-snake
- Run
npm install
to install the dependencies
- Follow these steps to setup a Discord Bot linked to your account. You'll use this bot for testing.
- Add a bot to a server you own
- Open the repository folder
discord-snake
with VS Code - Create a new file called
.env
in the root folder of the project - Copy the following into
.env
:
DISCORD_TOKEN="YOUR_TOKEN"
Hopefully you're now ready to start up the bot! Test it out by running npm start
in your terminal.
If you see "Ready !" logged out, your server is running.
Press ctrl + c in the terminal window to shutdown the bot.
Optionally, you can install nodemon to live update your bot as you make changes to the code!
- Run
npm install nodemon -g
to globally install nodemon - Start the server by running
nodemon npm start
- You can force a restart by typing
rs
into the terminal, and shutdown the bot by pressing ctrl + c