Skip to content

Discord Bot that gives you a random Valorant Agent

Notifications You must be signed in to change notification settings

NadiaMit/ValorantBro

Repository files navigation

ValorantBro

image

Discord Bot that suggests a random Valorant agent in discord for you to play.

  • !agent sends back a message with a random agent from Valorant
  • !allagents sends back all agents. (Mainly for debugging at this stage)

Installation & Launch

All commands below are to be executed relative to the repository's root directory.

Install Manually

Prerequisites

Install Node.js and npm. This bot was tested with Node V17, but any recent version (16+) should do.

  1. Clone this repository.

  2. Install all required dependencies using npm:

    npm install .

  3. Create a file called .env by copying .env.template.

  4. Fill out all necessary variables in the .env file. Right now, this file will only contain your Discord bot token, which you can obtain from your bot's application page.

  5. You can now run the bot from the repository's root:

    node .

Install Using Docker

Prerequisites

Install the latest version of Docker and optionally Docker Compose.

Via Docker:

  1. You can easily build a local container image:

    docker build -t valorantbro .

  2. Just like in the manual installation above, create a file called .env by copying .env.template.

  3. Fill out all necessary variables in the .env file. Right now, this file will only contain your Discord bot token, which you can obtain from your bot's application page.

  4. The container can then be started:

    docker run -d -v $(pwd)/.env:/home/node/.env:ro --name valorantbro valorantbro:latest

    As you can see, the .env file you created is also (bind-)mounted into the container in order to securely provide your bot's token.

Via Docker Compose:

  1. Build the image and run the container in one go:

    docker-compose run -d