{"id":15451875,"url":"https://github.com/descholar-ceo/telegram-bot","last_synced_at":"2025-10-28T09:31:45.731Z","repository":{"id":52168271,"uuid":"283406405","full_name":"descholar-ceo/telegram-bot","owner":"descholar-ceo","description":"In this project, I built a telegram bot that tells you the COVID-19 statistics, today's word of brevity, and today's quote.","archived":false,"fork":false,"pushed_at":"2024-08-01T23:09:46.000Z","size":257,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-04-19T23:54:27.670Z","etag":null,"topics":["ruby","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/neza_connect_bot","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/descholar-ceo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-29T05:25:10.000Z","updated_at":"2021-07-28T13:07:07.000Z","dependencies_parsed_at":"2025-01-05T17:12:27.464Z","dependency_job_id":"24a68c2c-1e32-458a-a50e-93906676c8b1","html_url":"https://github.com/descholar-ceo/telegram-bot","commit_stats":{"total_commits":86,"total_committers":1,"mean_commits":86.0,"dds":0.0,"last_synced_commit":"f518c37426178fabafa1985077d10663fee5bf0c"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descholar-ceo%2Ftelegram-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descholar-ceo%2Ftelegram-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descholar-ceo%2Ftelegram-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descholar-ceo%2Ftelegram-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/descholar-ceo","download_url":"https://codeload.github.com/descholar-ceo/telegram-bot/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830852,"owners_count":21331357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby","telegram-bot"],"created_at":"2024-10-01T21:40:22.502Z","updated_at":"2025-10-28T09:31:40.697Z","avatar_url":"https://github.com/descholar-ceo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram-bot\n![Linters](https://github.com/descholar-ceo/telegram-bot/workflows/Linters/badge.svg)  ![Tests](https://github.com/descholar-ceo/telegram-bot/workflows/Tests/badge.svg)  [![Gem Version](https://badge.fury.io/rb/telegram-bot-ruby.svg)](https://badge.fury.io/rb/telegram-bot-ruby)\n\n\n## Description\n`telegram-bot` is a chatbot built on top of [Telegram messenger](https://telegram.org/), this means you access it via [Telegram messenger](https://telegram.org/). It is able to help you with the following: \n- Giving you statistics of COVID-19 (Corona virus)\n- Giving you word of bravity\n- Telling you programming quote\n- Telling the current time\n- Telling you the current date\n\n## Built with\n* [Ruby](https://www.ruby-lang.org/en/)\n\n## Screenshots\nThe following screenshots, show you the command and it's response (Command : header, response:screenshot)\n|`/start`|`/help`|`quote`|\n|-|-|-|\n|![](assets/start-command.png)|![](assets/help-commands.png)|![](assets/quote-command.png)|\n\n|`word`|`covid/usa`|`date`|\n|-|-|-|\n![](assets/word-command.png)|![](assets/covid-command.png)|![](assets/date-command.png)\n\n## Deployment\n- Go in your telegram account, and search `@neza_connect_bot` and hit `START` button or simply access it via this link [nezaBot](https://t.me/neza_connect_bot)\n\n## Setup\nTo be able to use this bot follow the following steps\n\n### Pre-requisites:\nTo be able to setup and run this project locally, you should have the following\n1. [Ruby](https://www.ruby-lang.org/en/) installed on your computer\n1. [Telegram account](https://telegram.org/)\n1. Computer ready to run `terminal`, or `bash`\n\n### Installation:\n1. Run this command `git clone https://github.com/descholar-ceo/telegram-bot.git \u0026\u0026 cd telegram-bot` to clone and go in this repo\n2. Create a file and name it `.env` in root directory of this project\n3. Copy all of the fields which are in `.env.example` file from the root directory =\u003e in next steps I will show you how you are going to get the values of those fields \n4. Click [here](https://t.me/BotFather) or go to your telegram and search for `@BotFather` and send him this message: `/newbot` and follow instruction untill you get your bot api token which appears to look like this: `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`\n5. Copy it and paste it on the first field in your `.env` file, (that field is `TELEGRAM_BOT_API_TOKEN=`)\n6. Go to [RapidApi](https://rapidapi.com/api-sports/api/covid-193?endpoint=apiendpoint_dfb9e52d-bd90-48ec-a571-8b78610a736d), Signup or signin, and get your `COVID_API_HOST, COVID_API_KEY` and `COVID_API_URL` from there. When you see the window which looks like the following on the screenshot, scroll down on the rightmost window, and copy the values of `request[\"x-rapidapi-host\"]`: paste this value on `COVID_API_HOST` in your `.env` file, and copy the value of `request[\"x-rapidapi-key\"]` and paste it on `COVID_API_KEY` in your `.env` file, lastly for the `COVID_API_URL` use `https://covid-193.p.rapidapi.com/statistics`.\n![](assets/rapid-api-window-showcase.png)\n\n7. For the remaining fields use the following values:\n\n```bash\n\n    i.  WORD_OF_DAY_API=https://type.fit/api/quotes\n    ii. PROGRAMMING_QUOTE_API=https://programming-quotes-api.herokuapp.com/quotes/lang/en\n\n```\n\n8. Run `bundle install` =\u003e To install all gems\n\n### Start it\n1. Run `bin/main.rb` =\u003e To start your `telegram-bot`. At this point you should see in your terminal a window which looks like the following on the screenshot:\n![](assets/telegram-bot-terminal-screen.png)\n2. Now your bot is live and is able to follow the commands you give it, go in your telegram messenger, and look for your bot, =\u003e the bot name you provided to the botfather on step 4.\n3. Once you found it, click on it and hit `START` button, and start chatting with it, in last step, I will show you the list of commands the bot can understand so far\n#### 12. List of messages (commands) currently this bot will respond to are:\n```bash\n  1. message : /start   =\u003e  response : Greeting and introduction\n  2. message : /help    =\u003e  response : List of all available messages (commands)\n  3. message : word     =\u003e  response : Word of bravity of the day\n  4. message : quote    =\u003e  response : Today programming quote\n  5. message : time     =\u003e  response : To get current time\n  6. message : date     =\u003e  response : To get current date\n  7. message : covid/\u003cname_of_country   =\u003e  response : To read covid-19 statistics of any country\n  \n  ===\u003eremember to replace \u003cname_of_country\u003e with the country name you want to read its statistics,\n  example: covid/usa\n```\n### Running tests locally\nIf all of the installations went well in the previous step, then you will be able to run tests\n1. Initialize RSpec by running `rspec --init`\n1. Run `rspec` =\u003e If you get some failures under `LookUp #read`, make sure that you have a stable internet connectivity\n\n## Gems used\n\n```bash\n\n1. dotenv\n2. json\n3. net-http-persistent\n4. rspec\n5. rubocop\n6. telegram-bot-ruby\n\n```\n\n## Contributions\n\nThere are two ways of contributing to this project:\n\n1.  If you see something wrong or not working, please check [the issue tracker section](https://github.com/descholar-ceo/telegram-bot/issues ), if that problem you met is not in already opened issues then open the issue by clicking on `new issue` button.\n\n2.  If you have a solution to that, and you are willing to work on it, follow the below steps to contribute:\n    1.  Fork this repository\n    1.  Clone it on your local computer by running `git clone https://github.com/your-username/telegram-bot.git` __Replace *your username* with the username you use on github__\n    1.  Open the cloned repository which appears as a folder on your local computer with your favorite code editor\n    1.  Create a separate branch off the *master branch*,\n    1.  Write your codes which fix the issue you found\n    1.  Commit and push the branch you created\n    1.  Raise a pull request, comparing your new created branch with our original master branch [here](https://github.com/descholar-ceo/telegram-bot)\n\n## Author (s)\n### 1. MUGIRASE Emmanuel\n* Github: [@descholar-ceo](https://github.com/descholar-ceo)\n* Twitter: [@descholar3](https://twitter.com/descholar3)\n* LinkedIn: [MUGIRASE Emmanuel](https://www.linkedin.com/in/mugirase-emmanuel-a90b49143)\n\n## Show your support \nGive a ⭐️ if you like this project!\n\n## Acknowledgment\n* [Microverse](https://microvese.org): My great school\n* [telegram-bot-ruby](https://github.com/atipugin/telegram-bot-ruby): It's a gem I used while creating this project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdescholar-ceo%2Ftelegram-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdescholar-ceo%2Ftelegram-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdescholar-ceo%2Ftelegram-bot/lists"}