GithubHelp home page GithubHelp logo

fynnix / krp-discord-bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 355 KB

Discord Bot that can generate encrypted krp mods.

Home Page: https://fynnix.github.io/krp-discord-bot/

License: MIT License

JavaScript 2.12% TypeScript 95.81% Dockerfile 2.07%
bot discord kart pro racing

krp-discord-bot's Introduction

krp-discord-bot

Discord Bot that can generate encrypted krp mods.

Requirements

Windows

  • git
  • lock.exe (Piboso has the file)
  • Node.js (Tested with 18.17.0)
  • pnpm

Linux

  • git
  • lock.exe (Piboso has the file)
  • Node.js (Tested with 18.17.0)
  • pnpm
  • Wine (32 bit + 64 bit)

Ports

  • Make sure WEBSERVER_PORT is open

Role structure

  1. Patreon role

    Has access to all mods

  2. Mods specific role

    Only access to one mod

Folder structure

  • Mods Folder

    Put all unencrypted mods into that folder and name the file while creating the mod per command

Documentation

Documentation

Installing

General

  1. Open console

  2. Clone Repository:

    git clone https://github.com/FynniX/krp-discord-bot.git
  3. Open Bot Directory

    cd krp-discord-bot
  4. Setup Environment File

    Copy .env.example and rename it to .env

    • DATABASE_URL = "file://PATHTOFILE.db"
    • WEBSERVER_URL = http://YOURPUBLICIP:WEBSERVER_PORT
    • WEBSERVER_PORT (Define a free port for it)
    • MAX_THREADS (How many requests can be done simultaneously, be careful)
    • BOT_TOKEN (Discord bot token)
    • GUILD_ID (Discord server id)
    • PATREON_ROLE (Discord role for access to generating)
  5. Setup Environment

    pnpm install
  6. Mods Folder

    Create a folder called mods Why?

  7. Install lock.exe

    Place lock.exe inside bot directory

  8. Build Source

    pnpm run build
  9. Start Bot

    pnpm start

Linux Extras

  1. Node.js

    wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
    nvm install 18.17.0
    nvm use 18.17.0
  2. Wine

    apt update
    apt install wine
    dpkg --add-architecture i386 && apt-get update && apt-get install wine32
  3. pm2

    Can be used to start the bot on startup and run in background.

    npm i -g pm2
    pm2 startup

    Skip step 9 in General Instructions and use this command

    pm2 start pnpm --name KRP-Discord-Bot -- run start
    pm2 save
  4. pnpm

    wget -qO- https://get.pnpm.io/install.sh | sh -

License

Released under the MIT License.

krp-discord-bot's People

Contributors

dependabot[bot] avatar fynnix avatar

Watchers

 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.