{"id":17662365,"url":"https://github.com/rkrohk/gobot","last_synced_at":"2026-05-04T12:33:24.726Z","repository":{"id":45069884,"uuid":"322945573","full_name":"RKRohk/gobot","owner":"RKRohk","description":"A modular telegram bot utilizing microservices architecture. Written on GoLang","archived":false,"fork":false,"pushed_at":"2022-01-11T05:08:06.000Z","size":3880,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T13:24:01.944Z","etag":null,"topics":["docker","docker-compose","golang","microservices"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RKRohk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-19T22:00:35.000Z","updated_at":"2021-10-26T08:26:09.000Z","dependencies_parsed_at":"2022-09-07T14:12:18.624Z","dependency_job_id":null,"html_url":"https://github.com/RKRohk/gobot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RKRohk%2Fgobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RKRohk%2Fgobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RKRohk%2Fgobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RKRohk%2Fgobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RKRohk","download_url":"https://codeload.github.com/RKRohk/gobot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246311407,"owners_count":20757134,"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":["docker","docker-compose","golang","microservices"],"created_at":"2024-10-23T18:07:32.456Z","updated_at":"2026-05-04T12:33:24.668Z","avatar_url":"https://github.com/RKRohk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gobot\n\nA modular telegram bot written using GoLang. Utilizing microservices architecture\n\n\n## Technologies Used\n - GoLang\n - Docker\n - Python\n - MongoDB\n - gRPC\n - AWS (Deployed)\n\n\n## About\n\nThis bot started as a small project to store class notes and keep assignment reminders on telegram. \nSlowly and gradually, a lot of features have been added to it\n\n\n## Structure\n\n```\n                --- Bot (written on GoLang)\n                |\n                |\n                --- AI gRPC endpoint (written on Python)\n                |\n                |\n                --- MongoDB instance\n                |\n                |\n Docker Daemon  --- Mongo Express (to view the database)\n                |\n                |\n                --- ElasticSearch1 (load balanced)\n                |\n                |\n                --- ElasticSearch2 (load balanced)\n  \n```\n\n\n## Features\n\n### AI\n\nThe bot learns from the speaking habits of it's users and learns to talk back. It is surprisingly good, almost seems like a real person is talking back.\nThe AI feature is handled by a python backend. The bot communicates with it using gRPC. \n\nTo use this feature, just start talking to the bot\n\n\n### DadJoke\n\n`/dadjoke` - Sends a random Dad joke to the chat\n\n### Echo\n\n`/echo Hello World`\nreplies:\n`Hello World`\n\nEchos back the message sent\n\n### Reminder\n`/remind 25/02/2000 12:00 IST Rohan's Birthday`\nreplies:\n```Okay, I will remind you about\n Rohan's Birthday\n \n on 25/02/2000 12:00 AM\n```\n\nKeeps reminders\n\n### Save\n`/save #\u003ctag\u003e`\nSaves a note with a tag. Also if a file is given, it is passed through a pipeline where OCR is run on it, \nit is indexed and ready to be searched, like Google! but for your files.\n\n### Get\n`/get #\u003ctag\u003e`\nGets all notes with the given tag\n\n\n### Search\n`/search #\u003ctag\u003e \u003cquery\u003e` - returns the file which contains the notes on query. \nThe query need not be exact, as the search engine uses fuzzy algorithms and replaces words with synonyms to find the perfect match. \n\n### Slap\n`/slap Rohan`\nreplies:\n`Rohan hit Rohan around a bit with a trout`\n\nSlaps the person the command is used against\n\n## StickerSlap\n`/stickerslap`\n\nReply to a user with this command and the bot will slap them with a sticker\n\n\n## Deployment\n\nThis bot can be deployed on any linux server with Docker installed. \nUsing docker compose, it can also be deployed on services like AWS Elastic Beanstalk, DigitalOcean Application Service, etc\n\n## Docker Compose Structure\n```\nversion: \"3\"\nservices:\n  bot:\n    image: rkrohk/gobot:latest\n    env_file: \"./.env.gobot\"\n    restart: always\n\n  mongo:\n    image: mongo\n    container_name: mongo\n    ports:\n      - 27017:27017\n    expose:\n      - 27017\n    volumes:\n      - mongodata:/data/db\n\n  chatbotapi:\n    image: rkrohk/chatbotapi\n    container_name: chatbotapi\n    hostname: chatbotapi\n    expose:\n      - 50051\n\n    environment:\n      - MONGO_URI=mongo\n\n    volumes:\n      - chatbotapi_data:/src/app/data\n      - nltk_data:/root/nltk_data\n\n  mongo-express:\n    image: mongo-express\n    environment:\n      - ME_CONFIG_MONGODB_SERVER=mongo\n      - ME_CONFIG_MONGODB_PORT=27017\n    ports:\n      - \"8080:8081\"\n\n\n  es01:\n    image: rkrohk/elasticsearch\n    container_name: es01\n    environment:\n      - node.name=es01\n      - cluster.name=es-docker-cluster\n      - discovery.seed_hosts=es02\n      - cluster.initial_master_nodes=es01,es02  \n      - bootstrap.memory_lock=true\n      - \"ES_JAVA_OPTS=-Xms512m -Xmx512m\"\n    ulimits:\n      memlock:\n        soft: -1\n        hard: -1\n    volumes:\n      - data01:/usr/share/elasticsearch/data\n    ports:\n      - 9200:9200\n\n  es02:\n    image: rkrohk/elasticsearch\n    container_name: es02\n    environment:\n      - node.name=es02\n      - cluster.name=es-docker-cluster\n      - discovery.seed_hosts=es01  \n      - cluster.initial_master_nodes=es01,es02  \n      - bootstrap.memory_lock=true\n      - \"ES_JAVA_OPTS=-Xms512m -Xmx512m\"\n    ulimits:\n      memlock:\n        soft: -1\n        hard: -1\n    volumes:\n      - data02:/usr/share/elasticsearch/data\n\n\nvolumes:\n  mongodata:\n  nltk_data:\n  chatbotapi_data:\n  data01:\n    driver: local\n\n  data02:\n    driver: local \n```\n\nAlong with the docker compose file, you also need a file named\n`.env.gobot` to store secrets.\n\nStructure of `.env.gobot`\n```\nBOT_TOKEN=\u003cbot token\u003e\n\nBLOCKED_USER=\u003cuser ids of banned users\u003e\n\nOWNER=\u003cyour telegram user id, get it by using /id\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkrohk%2Fgobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkrohk%2Fgobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkrohk%2Fgobot/lists"}