lenilsonjr / TeaBot

πŸ€– API for @teatodo_bot. TeaBot lets you create and manage tasks in Telegram

Home Page:https://t.me/teatodo_bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ€– TeaBot

TeaBot is a todo-list manager for Telegram. You can use it directly or add it to a group chat.

@teatodo_bot in action

πŸ’¬ Using it

Just send a message to @teatodo_bot on Telegram to use it. From /help:

🚧 πŸ‘‰ Use /todo para adicionar um afazer
βœ… πŸ‘‰ Use /complete <texto do afazer> ou /complete <id do afazer> para completar um afazer
❌ πŸ‘‰ Use /remove <texto do afazer> para deletar um afazer
πŸ“‘ πŸ‘‰ Use /todos para listar todos seus afazeres
⏰ πŸ‘‰ Use /done para ver o que vocΓͺ fez nas ΓΊltimas 24hrs
🏎️ πŸ‘‰ Use /leaderboard para ver os topzeras que mais fazem coisas

πŸ‘· Running up your own bot

git clone git@github.com:lenilsonjr/TeaBot.git
cd TeaBot
cp config/secrets-example.yml config/secrets.yml && cp config/database-example.yml config/database.yml && cp config/environments/production-example.rb config/environments/production.rb
bundle install

Don't forget to setup your bot credentials on secrets.yml:

development:
  secret_key_base: <generate a new one using rake secret>
  telegram:
    bot:
      token: <telegram bot token>
      username: <bot username>

You can talk to @BotFather on Telegram and he'll create bots and access tokens for you.

Set up your mySQL credentials in config/database.yml and then use rake to create the database

rake db:create
rake db:schema:load

You're ready to go! You can use bot poller while in development to test your bot.

rake telegram:bot:poller

πŸš€ Deploying a new bot

This project uses Capistrano for deployment.

cp config/deploy-example.rb config/deploy.rb && cp config/deploy/production-example.rb config/deploy/production.rb

Edit each of these files to match your deploy info.

You should create a database.yml and a secrets.yml in your server's Capistrano shared folder structure. Don't forget to edit production.rb:27 to match your API's domain.

Also, don't forget to edit your Capfile to match your stack.

After configuring everything, just type cap production deploy and the bot will be deployed. This guide may help you.

✨ Future Improvements

  • Internationalize bot (currently it only speaks portuguese)
  • Create tests

✏️ Contributing

You know the business. Just fork the repo and send a PR with your fix or new feature. I made this bot in a hurry, so the code certainly can be improved. Feel free to help!

About

πŸ€– API for @teatodo_bot. TeaBot lets you create and manage tasks in Telegram

https://t.me/teatodo_bot


Languages

Language:Ruby 99.3%Language:HTML 0.7%