STTUser / gotbot

Star Trek Timelines chat bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Star Trek Timelines chat bot

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 57.7%Language:JavaScript 32.3%Language:HTML 8.2%Language:Shell 1.5%Language:Dockerfile 0.2%Language:CSS 0.1%