https://github.com/ynot01/tarkov-price-twitch-bot
A Twitch chat bot for price checks on the Tarkov market
https://github.com/ynot01/tarkov-price-twitch-bot
escape-from-tarkov tarkov twitch twitch-bot
Last synced: 2 months ago
JSON representation
A Twitch chat bot for price checks on the Tarkov market
- Host: GitHub
- URL: https://github.com/ynot01/tarkov-price-twitch-bot
- Owner: ynot01
- License: apache-2.0
- Created: 2024-01-31T19:47:09.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-11T16:57:49.000Z (9 months ago)
- Last Synced: 2024-09-12T02:31:17.327Z (9 months ago)
- Topics: escape-from-tarkov, tarkov, twitch, twitch-bot
- Language: TypeScript
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tarkov Price Twitch Bot
The goal of this bot is to provide information to chatters and streamers of which items are valuable to sell.
I use this to run my Twitch bot, tarkovpricerbot.

## Running your own personal bot
- Create a Twitch app at [Twitch's dev console](https://dev.twitch.tv/console). Set the redirect URI to `https://twitchapps.com/tokengen/`. **Take note of the Client ID.** If the "Submit" button doesn't work, it may be because of illegal characters or phrases in the name.
- Create a Twitch account; this will be your bot account. It is recommended that you verify the account with a phone number to avoid complications with being unable to chat without VIP/mod. If you are only intending to use this bot for your own channel, you can just mod it.
- While logged in to the bot's Twitch account, copy & visit the below URI, replacing `` with your Client ID noted in the first step.
```
https://id.twitch.tv/oauth2/authorize
?response_type=token
&client_id=
&redirect_uri=https://twitchapps.com/tokengen/
&scope=chat:read+chat:edit
&state=test
```- You will receive your OAuth token here. **DO NOT SHARE IT WITH ANYONE.**
- Go into `index.mts`
- Replace the username field containing `yourbotaccountusername` with your bot's username.
- Replace the password field containing `yourbotaccountoauth` with your **OAUTH TOKEN, NOT YOUR PASSWORD.**
- Place your desired channel(s) in the `channels` array. If your channel URL is `twitch.tv/foobar` then it should look like `'foobar'` in the array.
## Compile & run
### Option 1 (Containerized)
- Install [Docker](https://docs.docker.com/get-docker/) and run `docker compose up --build` (include `-d` to run the container detached from the terminal) to build and launch a container that will run the bot. This is recommended for [dedicated servers](https://www.digitalocean.com/).### Option 2 (Simpler)
- Install `tsx` via the [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) command `npm install -g tsx` and run `tsx index.mts` in the repo root folder to launch the bot.
- You may have to run `npm i` once in the project directory to install the required packages.## Usage
Price check: `!p ` or `!price ` in Twitch Chat where `` is the name of an item.
Trader-only price check: `!t ` or `!trader ` or `!traders ` in Twitch Chat where `` is the name of an item.
## Thanks
- [tmi.js](https://tmijs.com/) for Twitch interaction
- [tarkov.dev](https://tarkov.dev/) for EFT API
- [js-search](https://github.com/bvaughn/js-search) for easy search indexing