GithubHelp home page GithubHelp logo

telegramlistbot's Introduction

Create lists in Telegram groups (bot)

How to add it to your group

  1. Open the Telegram group in which you would like to enable lists.
  2. Open group "Info" and click "Edit" to go to group settings.
  3. Click on "Administrators" and "Add Admin"
  4. Type "@create_lists_bot" in the search and click on "List".
  5. Click on "Done" to add the bot to the group. It might ask whether you want to first add the bot as a member to the group and then promote it to admin. In that case click yes.

How to create a list

  • In the group, type "/list blabla" as a message and send it. This will create a list with "blabla" as the first item. To add more items, again type "/list blubb".
  • Type "/list" to show the list.
  • Click on a list-item to remove it.

If you first want to try out how to use the bot, you can simply start a private message with @create_lists_bot and create list there that only you will see.

Contributing

Local development

  1. Clone this repository.
  2. In order to be able to send and receive message via Telegram you first need to create a bot: Create a bot with botfather. There you get a token.
  3. In the terminal, go to the app's folder with cd TelegramListsBot.
  4. Create a database by running yarn install, mkdir data and npx sqlite3 ./data/development.db.
  5. Create the database-tables by running the following three commands:
sqlite3 ./data/development.db
> CREATE TABLE list_items ("id" INTEGER NOT NULL UNIQUE,"chat_id" INTEGER NOT NULL,"text" TEXT NOT NULL, "checked" TEXT NOT NULL, PRIMARY KEY("id" AUTOINCREMENT));
  1. Rename the file .env_example to .env and set DEV_BOT_TOKEN to the token, you've got from BotFather.
  2. Then run yarn watch.

Now the bot is started in watch-mode, i.e. whenever you make changes to the code and save them, the bot automatically updates. You can now open Telegram (on the computer or phone) and use the bot (like in "How to create an list").

Create your own bot with your changes

Follow the steps under "Local development"

You might find it useful to create two different bots, one for local development and one for production (for the outside world). In that case, create another bot with BotFather and paste the respective token into the .env-file under PROD_BOT_TOKEN.

For deployment I found uberspace really nice.

5eel free to send me a message if anything doesn't work.

Used technology & acknowledgements

We use node-telegram-bot-api, node-telegram-keyboard-wrapper and sqlite3.

You may find these documentations useful: node-telegram-bot-api documentation, Telegram API documentation.

telegramlistbot's People

Contributors

david-ziegler avatar

Watchers

 avatar

telegramlistbot's Issues

Show checked items for some time

Ideas:

  • Strike through checked item, move it to the bottom of the list, and remove it: e.g. the next time someone adds something, or after a few hours, or a midnight
  • Show keyboard with name of checked item and the possibility to undo

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.