GitXplorerGitXplorer
g

gotbot

public
7 stars
4 forks
10 issues

Commits

List of commits on branch master.
Unverified
ddcb0d609728ca9f610a4bb0c3b4ffbb26825b3e

feat: switch to new URL_SERVER

gglorat committed a year ago
Unverified
dab5b04f4bafe3a6e9b545fd6348246bd50ad400

feat: upgrade stt client to 20

gglorat committed 2 years ago
Verified
74a23b7184da15ac8b9c35b8ba8992202235e79f

Merge pull request #117 from glorat/glorat-patch-1

gglorat committed 2 years ago
Verified
513495fd9f23369b66f8e836f2ac9897a63154c6

feat: increase boss calc penalty for alphabetical trait assertion

gglorat committed 2 years ago
Unverified
3c0da99ab2459e9dec802f8df60d71c3f80b9bf3

fix: boss add command args typo

gglorat committed 2 years ago
Unverified
ff977a8bdd3ffef5b26e0809e7170c9795b1dfe3

chore: remove tsc from Dockerfile since switch to ts-node

gglorat committed 2 years ago

README

The README file for this repository.

gotbot NPM version Build Status Dependency Status

Introduction

This is probably the most advanced Star Trek Timelines chat bot in existence. It supports all the basic commands you'd expect from most similar bots such as

  • Basic crew stats
  • Extended crew stats including rankings and special links
  • Crew search by traits or character type

More advanced query capability such as

  • Mission drop rates
  • Gauntlet success calculator
  • Voyage mission time estimator
  • A user manual for the discord administrator

There are killer features under development including

  • Crew selection and management - keep track of all your crew
  • Gauntlet crew optimizer
  • Voyage crew optimizer

There is a freely available public version of this bot that can be installed on your server with two clicks. For more information, please join https://discord.gg/R8QzpjW and ask the moderator for instructions

To reach the author for help or thanks or other issues, join Discord at https://discord.gg/R8QzpjW

Bug reports in the code and pull requests are welcome but any requests for help will be closed with redirection to Discord

Why open source?

This bot has killer features made especially for the author's fleet the Guardians of Tomorrow. But we do want to give a better STT experience for the whole community. The killer features could have been kept strictly secret but here are the motivations

  • For any general fleet in the community, you can run a freely hosted free version of the bot by asking at https://discord.gg/R8QzpjW
  • If you are a node.js developer who can understand this code, I'm looking for people willing to help maintain and contribute to the codebase. If you are able to do that, please work with us and in exchange it is fair you get full access to the key features. If you are only seeking to use the bot, please use the freely hosted and supported version

It is my hope that by open sourcing these secrets, when the day comes this author is no longer around to maintain the bot, someone else will be able to pick up the baton. I'd be happy to help guide that person should they come forward.

Installation

Pre-requisite knowledge for developers

  • Typical node.js setup and installation
  • discord.js, including obtaining Discord tokens
  • cron/supervise and other schedulers

If you need help on the above, please RTM. Otherwise proceed...

Node 12 or higher is required!

Clone this repository, and run:

$ npm install && npm test

Copy password_sample.js to data/password.js and supply valid Discord bot tokens

The bot requires the GUILD_MEMBERS privileged intent so please enable that for your bot per https://discord.com/developers/docs/topics/gateway#privileged-intents

Usage

$ ./gotcron
$ node lib/cachewiki.js
$ npx ts-node lib/index.ts 

If you have daemontools installed, you can also do supervise . to run the node apps. You can use cron to schedule gotcron to be run at an appropriate interval

Docker support

A DockerHub image is available to be pulled at glorat/gotbot. For this image to work you will need

  • To mount a persistent volume at /usr/src/gotbot/data
  • Copy a password.js in there (see test-data/ for a sample)
  • You'll need to pre-run ./gotcron before the main CMD can be executed

Obviously, this is very fiddly so it's best to get a bash shell up against the container to set everything up before running the container normally. Patches welcome to bundle all the pre-checks into the run script so it Just Works

License

Copyright © Kevin Tam 2018 Licensed under the GNU Affero General Public License v.3.0