Skip to content

Hawkzed/discord-snake

 
 

Repository files navigation

discord-snake

A bot to play snake on discord

Build Status

Recommended tooling

IDE

Visual Studio Code with the following packages:

  • ESLint
  • Jest
  • npm Intellisense
  • Path Intellisense
  • vscode-icons

Git for Windows

Setup

NPM

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.

  1. Install Node.js
  2. Verify your installation was succesful by running node -v and npm -v in your terminal.

SSH keys

If you already have an SSH key for your development machine linked to your GitHub account you can skip this section.

  1. Generate an ssh key and add it to an ssh-agent

  2. Add an ssh key to your GitHub account

Repository setup

  1. Open your terminal
  2. Navigate to the directory where you want the local copy of the repository to be stored
  3. Clone the repository by running git clone [email protected]:ptlm500/discord-snake.git
  4. CD into discord-snake by running cd discord-snake
  5. Run npm install to install the dependencies

Setting up a Discord Bot

  1. Follow these steps to setup a Discord Bot linked to your account. You'll use this bot for testing.
  2. Add a bot to a server you own
  3. Open the repository folder discord-snake with VS Code
  4. Create a new file called .env in the root folder of the project
  5. Copy the following into .env:
DISCORD_TOKEN="YOUR_TOKEN"

Test it out!

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!

  1. Run npm install nodemon -g to globally install nodemon
  2. Start the server by running nodemon npm start
  3. You can force a restart by typing rs into the terminal, and shutdown the bot by pressing ctrl + c

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%