Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
/ TeaBot Public archive

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

Notifications You must be signed in to change notification settings

lenilsonjr/TeaBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– 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 [email protected]: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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published