Code Monkey home page Code Monkey logo

telegram-bot's Introduction

Telegram Bot

This is a Telegram bot which works like a restricted mail group where only admins can send messages directly. When a regular user sends a message (via /suggest <link>) it's moderated by admins. If a suggestion by a regular user is accepted then it becomes a message otherwise it's ignored and only be seen by admins. Just like a mail group, all messages are delivered to all users.

Purpose of this bot is to create a medium where people can receive a curated stream of technological updates.

Usage

Command Description
/start Subscribe/Resubscribe to updates
/stop Unsubscribe from updates
/suggest <link> Suggest sharing a link with all other users. If one of the admins accepts it's shared.
/send <link> Only available to admins. Directly shares a link with all other users and admins.

Deployment

You can fork and create your own bot. Only thing you need to do is to create a bot via BotFather and then use its token.

Following environment variables are required:

  • BASE_URL - without a trailing slash
  • TOKEN -
  • MONGO_URI

To test in local environment you need to use ngrok which is an application that exposes your local ip to a globally reachable temporary domain name so that you can receive Telegram's webhook request while running on localhost.

Development Resources

LICENSE

© Copyright 2018 Kod Gemisi Ltd.

Mozilla Public License 2.0 (MPL-2.0)

https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)

MPL is a copyleft license that is easy to comply with. You must make the source code for any of your changes available under MPL, but you can combine the MPL software with proprietary code, as long as you keep the MPL code in separate files. Version 2.0 is, by default, compatible with LGPL and GPL version 2 or greater. You can distribute binaries under a proprietary license, as long as you make the source available under MPL.

See Full License Here

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.