Giter Site home page Giter Site logo

erykslezak / tarkov-prime-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from romanbb/tarkov-prime-bot

0.0 0.0 0.0 534 KB

Discord bot that listens for flea market lookup queries and tells you prices

License: GNU General Public License v3.0

TypeScript 99.95% Dockerfile 0.05%

tarkov-prime-bot's Introduction

Tarkov Prime Bot

This is a Discord bot that allows you to lookup flea market prices with your voice. Small demo.

How it works

The bot listens and transcribes all text spoken by any user who starts the bot command. Then that transcribed text is processed in the bot and matched against some pattern, like price check <item>. Then <item> is looked up on Tarkov-Market and the bot spits out some useful information from there. Along with a shorter TTS message played in the channel.

Vocabulary

This is what makes this work. There's a file support/transcribe_vocab.txt that contains all the mappings for Amazon Transcribe. The vocab name is hardcoded to tarkov for now, you should update yours accordingly.

There's a helper script you can run to push updates to AWS.

     npm run update-vocab

Make sure you check the status afterwords to see if there are any parsing failures. It needs to follow these guidelines.

If you plan to contribute to this list, please reach out to me and I can give you access to a master spreadsheet with items catagorized by sheets. There's an export script that generates support/transcribe_vocab.txt.

Run it yourself

Commands

You first need to !deploy the bot. Only the owner of the app can deploy it. It will try to auto-deploy if you have the guild id configured.

  1. /join to join your voice channel.

  2. /start to tell the bot to start recording you. It's opt-in.

  3. /stop stop listening

  4. /leave leave the voice channel

  5. /check do a text-based lookup

Requirements

  1. Basic knowledge of
    • Node
    • TypeScript
    • AWS
  2. AWS Account (this will cost based on usage)
    1. Amazon Transcribe
    2. Amazon Polly - TTS
    3. S3: for storing/loading vocab model for Transcribe
  3. Your own Discord App ID

Flea Market Data

Currently two sources available. By default it will use tarkov.dev. But it also has support for Tarkov-Market, but you need to have an API key to use Tarkov-Market, which costs $5/mo.

Run Locally

Dev Mode

Runs with .env.dev vars. Has ability to auto-join and start recording a preset user in a preset guild, outputing to a preset channel based on the environment variables.

This wll build and run the service.

  npm run dev

Prod mode

Just runs with node in prod environmment with .env loaded. Doesn't build.

  npm run prod

Deploy

I am trying fly.io to host this right now. You can deploy with:

  npm run deploy

Secrets & Credentials

All secrets will be stored in .env/.env.dev file.

For development the .env.dev file is used instead. For full reference of all the variables check out src/config.env.ts.

TODO

  • Finish adding item voice models!
  • Session persistence (for seamless redeploys?)

tarkov-prime-bot's People

Contributors

romanbb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.