Git Product home page Git Product logo

snwtm's Introduction

SNW TM

A collection (maybe) of tools for TM.

Used with https://github.com/Snekw/SNWTMMap

Usage

This API can be used with any chat bot that supports fetching text from an url.

Multiple different texts can be defined by pressing "New" button. Remember to save any changes you make. And it's not a bad idea to store the texts on our own side as well.

The token should be kept private as it is used to authenticate changes to the backend.

ChatBots

Most chat bots support some sort of fetching of data from URL. This method is used to output the chat command output.

  • Nightbot:
    • !commands add !map $(urlfetch https://tm.snekw.com/api/map/view/****/**** )
      • Replace the url with the url found on tm.snekw.com/map under "Texts" section.
  • StreamElements:
    • !command add map ${urlfetch https://tm.snekw.com/api/map/view/****/****}
      • Replace the url with the url found on tm.snekw.com/map under "Texts" section.
  • Moobot:
    • Create a new custom command
      • Select "Response" as "URL fetch - Full (plain) response"
      • Paste the url to "URL to fetch"
      • Leave all other URL fetch parameters as default
  • Other bots:
    • Most bots have some form of custom API support
      • Most commonly it's named URL-fetch, customapi or readapi
      • Follow the instructions for your own bots version of this and it should work

Hosting

Docker image is provided through Docker Hub https://hub.docker.com/r/snekw/snwtm.

Requires a MongDB database to be available.

Environment variables

Few environment variables are required.

Variable Expected value Purpose
MONGO_STR Mongo DB connection string Provides database connection information.
SNW_TM_HOST URL Provides the application the user facing URL of the page to provide full links.

snwtm's People

Contributors

snekw avatar

Stargazers

 avatar

Watchers

 avatar

snwtm's Issues

/map returns 500 error

Hi

just started the docker container. I can access the default page which shows me a "TM Game State" link.
Clicking on that link will return a 500 error.

How can i configure the token etc?

Thanks

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.