Stash is a Discord bot that helps you play Escape from Tarkov!
This is the official Tarkov.dev Discord bot.
To add the bot to your server, just click the link below:
This bot takes all the data from Tarkov.dev and exposes it in a user-friendly way.
This bot is open source and supported by the team behind Tarkov.dev.
Command | Example | Description |
---|---|---|
/help |
/help or help <command> |
The help command to view all available commands |
/price |
/price name: <item> |
Get a detailed output on the price of an item, its price tier, and more! |
/map |
/map woods |
View a map and some general info about it |
/barter |
/barter name: <item> |
Check barter details for an item |
/craft |
/craft name: <item> |
Check crafting details for an item |
/ammo |
/ammo ammo_type: 5.45x39mm |
Get a sorted ammo table for a certain ammo type |
/status |
- | Get the game/server/website status of Escape from Tarkov |
/about |
- | View details about the bot |
/issue |
/issue message: <text> |
Report an issue with the bot |
/invite |
- | Get a Discord invite link for the bot to join it to another server |
/tier |
- | Show the criteria for loot tiers |
/changes |
- | Get the latest game changes from tarkov-changes.com |
/patchnotes |
- | Get the latest official patchnotes for EFT |
/stim |
- | Get information about a in-game stim |
/roulette |
- | Play a game of roulette to determine how you play your next raid |
/uptime |
- | Get the bot's uptime |
For development you need to create two files in your local directory, one is for registering commands and the other one is for running the bot.
The files are:
config-dev.json
.env
Before you can test the bot locally, you will need to create a Discord bot.
Create your bot:
An example of the config-dev.json
file can be found at the root of this repo at config-dev.example.json
. You will need to edit and rename this file to config-dev.json
and add the appropriate values as seen below:
{
"clientId": "<add_value_here>",
"guildId": "<add_value_here>",
"token": "<add_value_here>"
}
The clientId
can be found in your Discord bot's general information under APPLICATION_ID
.
Copy the guildId
from the Discord server you want to add the bot to:
Note: In order to copy a
guildId
, you will need to have Discord developer mode enabled, scroll down in the guide to see how to do so (it's easy!)
The token is the same as the DISCORD_API_TOKEN
which can be found in the .env
setup steps below.
Next, you will need to edit the .env
file and add the appropriate values as seen below:
DISCORD_API_TOKEN=<value_here>
ADMIN_ID=<value_here>
NODE_ENV=development
The DISCORD_API_TOKEN
can be found here:
ADMIN_ID
is your personal Discord user ID, which is used for admin commands and can be found here:
To add the DEV bot to your server, click this link where you've replaced the <MY_CLIENT_ID>
with your bots application id:
In order to copy certain values (such as channel/guild/user IDs), you need to enable developer mode in the Discord client:
- In Discord, open your User Settings by clicking the Settings Cog next to your user name on the bottom.
- Go to Appearance and enable Developer Mode under the Advanced section, then close User Settings.
- Open your Discord server, right-click on the server name, then select Copy ID (to obtain the "guild ID" of your Discord server).
Before you start the bot, you will need to register the Slash commands in your test server:
$ npm run dev-commands
Successfully registered application commands.
Next, there are two ways to start the bot:
- Locally (suggested)
- Docker
To start the bot locally, run the following commands:
$ npm run dev
Filling autocomplete cache
fill-autocomplete-cache: 590.582ms
Logged in as stash-dev#1234!
To start the bot with Docker, simply run the following command:
$ docker-compose up --build
Creating bot ... done
Attaching to bot
bot | Setting up rollbar
bot | Filling autocomplete cache
bot | fill-autocomplete-cache: 944.249ms
bot | Logged in as stash-dev#1234!
Want to add a new item to the roulette?
Simply edit the following JSON file to add your entry!
Deploying the bot is very easy! Just do the following:
- Write the code for your changes
- Open a pull request
- Get a review and ensure CI is passing
- Comment
.deploy
on your pull request to deploy your changes to production
Test your changes in production before merging! If anything goes wrong, type
.deploy main
to revert your changes
Once your PR has been deployed and everything looks okay, merge away!