Skip to content

TacticalTechJay/translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translator Discord Bot

A meant-to-be simple translator bot that uses LibreTranslate API

Config

This bot is configurable through environmental variables that can be defined like so:

PREFIX=! node index.js

These are the following variables that you are required to set:

Config Default Description
TLURL "localhost" Base URL to your own LibreTranslate
PORT "80" Used for a translator api if it is hosted locally on your computer. Used with default TLURL and if it was not previously defined.
PREFIX "!" The prefix used to interact with the discord bot.
DISCORD_TOKEN "" A discord token for running a discord bot. Refer here. Not an optional variable.
DATABASE_URL "" A database URL used for Prisma to store a guild's config. Not an optional variable.

Installing and Running

Hold onto your environmental variables, there are some prerequisites to using this discord bot.

Everything checks out? Ok, now to get with setting this mayhem up!

  1. Initial setup

    Install all dependencies

    npm install

    Generate Prisma Client

    npx prisma generate
  2. Prepare your environemtnal variables!

    Run the bot!

    TLURL="https://libretranslate.com" PREFIX="tl!" DISCORD_TOKEN="totallylegittoken" DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public" node index.js

Releases

No releases published

Packages

No packages published