Giter Site home page Giter Site logo

xkcd-for-that-bot's Introduction

xkcd for that bot

Build Status Telegram @xkcdForThatBot

There's a relevant xkcd-for-that-bot! It helps you find relevant xkcd comics in Telegram.

The bot is available as @xkcdForThatBot.

Original Bot

The original bot by GingerPlusPlus is the inspiration for this bot. Its code is available on GitHub.

Deployment

Quick start:

npm install
npm start

Build

While the build is run automatically on install, you can also run it manually.

npm run build:prod

This will build the bot for production, which entails compiling the Elm code and then the TypeScript code. The generated JavaScript code sits in dist/.

Run

After building the project, it can be run with

npm start

This executes the entry file dist/index.js.

Development

npm run launch:dev

This will run the bot directly from the TypeScript files and disable webhooks, instead using polling. No need for an extra compilation step or setting up the server for webhooks.

npm run launch:prod

This will compile and start the bot, close to what npm install && npm start would do. Use this to reproduce the server environment more closely.

xkcd-for-that-bot's People

Contributors

wojpawlik avatar j-maas avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

Forkers

tretum

xkcd-for-that-bot's Issues

Use webhooks

Glitch does not wake up when polling. Use webhooks instead.

Recreate repo

The code was completely replaced. It is not a fork anymore.

Set up CD

Automatically deploy to Glitch on merge into master.

Investigate whether Task.sequence can be improved

The requests for xkcd comics can be parallelized, but need to be aggregated into one list in the end. I suspect Task.sequence does them sequentially. Ask, whether there is something like Task.parallel.

Fetch relevant xkcds for numbers

Currently, when a number is entered, it is treated as an id. For inline queries, what follows are the newest comics.

Instead of the newest comics, a search for the xkcds most relevant to the query should be done.

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.