Star Trek Timelines chat bot
Branch: master
Clone or download
glorat Update some packages (#57)
* Update some packages
Latest commit ec365d9 Feb 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client Merge pull request #56 from magelite/docker-tweaks Feb 10, 2019
lib Update some packages (#57) Feb 10, 2019
nginx Add nginx config Dec 27, 2018
test-data Merge remote-tracking branch 'github/master' into stt Feb 9, 2019
test Merge pull request #54 from glorat/dupes Feb 10, 2019
.editorconfig Initial commit of basic bot Mar 6, 2017
.eslintrc.json Broad manual eslint cleanup and renable failures on eslint Oct 3, 2017
.gitattributes More eol encoding fixes Feb 10, 2019
.gitignore
.travis.yml Force use of node 10 and higher stable or LTS Feb 9, 2019
Dockerfile
LICENSE Relicense under the AGPL as a better fit for the author's aspirations May 1, 2018
README.md Update readme for Docker Feb 9, 2019
config.ts Merge remote-tracking branch 'github/master' into stt Feb 9, 2019
gotcron
gulpfile.js Use dedicate test-data for tests Feb 3, 2019
package.json Update some packages (#57) Feb 10, 2019
run
sttdl.ts Fix sttdl config loading Feb 10, 2019
tsconfig.json Merge remote-tracking branch 'github/master' into stt Feb 9, 2019

README.md

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 10 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

Usage

$ ./gotcron
$ node lib/cachewiki.js
$ node lib/index.js 

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