{"id":13617600,"url":"https://github.com/athphane/userbot","last_synced_at":"2025-04-12T15:42:28.475Z","repository":{"id":39892239,"uuid":"216083990","full_name":"athphane/userbot","owner":"athphane","description":"Telegram Userbot built with Pyrogram","archived":false,"fork":false,"pushed_at":"2025-02-24T19:17:31.000Z","size":7045,"stargazers_count":163,"open_issues_count":1,"forks_count":102,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-03T16:13:06.249Z","etag":null,"topics":["pyrogram","python","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/athphane.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-18T18:23:43.000Z","updated_at":"2025-03-16T07:23:14.000Z","dependencies_parsed_at":"2024-03-01T20:25:30.486Z","dependency_job_id":"1e51b734-c0d9-4c37-9975-4877d6d7097e","html_url":"https://github.com/athphane/userbot","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/athphane%2Fuserbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athphane%2Fuserbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athphane%2Fuserbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athphane%2Fuserbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athphane","download_url":"https://codeload.github.com/athphane/userbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590919,"owners_count":21129914,"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":["pyrogram","python","telegram","telegram-bot"],"created_at":"2024-08-01T20:01:44.474Z","updated_at":"2025-04-12T15:42:28.453Z","avatar_url":"https://github.com/athphane.png","language":"Python","funding_links":[],"categories":["Table of Contents","Python"],"sub_categories":["PYTHON Projects"],"readme":"# Pyrogram Userbot\n![Python Version](https://img.shields.io/badge/Python-v3.8-blue)\n![Repo Size](https://img.shields.io/github/repo-size/athphane/userbot)\n[![Commit Activity](https://img.shields.io/github/commit-activity/w/athphane/userbot)](https://github.com/athphane/userbot/pulse)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b10d40c60fc549299eeb7bda1c7501aa)](https://app.codacy.com/manual/athphane/userbot?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=athphane/userbot\u0026utm_campaign=Badge_Grade_Settings)\n[![HitCount](http://hits.dwyl.com/athphane/userbot.svg)](http://hits.dwyl.com/athphane/userbot)\n[![Contributors](https://img.shields.io/github/contributors/athphane/userbot)](https://github.com/athphane/userbot/graphs/contributors)\n![Last Commit](https://img.shields.io/github/last-commit/athphane/userbot/master)\n![Issues](https://img.shields.io/github/issues/athphane/userbot)\n![Pull Requests](https://img.shields.io/github/issues-pr/athphane/userbot)\n[![License](https://img.shields.io/github/license/athphane/userbot)](LICENSE)\n\n\u003cimg src=\"https://i.imgur.com/WXUgDHT.png\" width=\"160\" align=\"right\"\u003e\n\n\u003e A Telegram Userbot based on [Pyrogram](https://github.com/pyrogram/pyrogram)\n\nThis repository contains the source code of a Telegram Userbot and the instructions for running a\ncopy yourself. Beside its main purpose, the bot is featuring [**Pyrogram Asyncio**](https:////github.com/pyrogram/pyrogram/issues/181) and\n[**Smart Plugins**](https://docs.pyrogram.org/topics/smart-plugins); feel free to explore the source code to\nlearn more about these topics.\n\nI assume you will read this whole README.md file before continuing.\n\n## Requirements\nYou're gonna need to get the following programs and services either installed on your server\nor signed up for. You must do all. It is a cardinal sin if you don't.\n* Python 3.10 (requirements were generated for 3.10. Python 3.8 is supported from the looks of it.)\n* `virtualenv` installed so that the packages don't interfere with other system packages.\n\n* [MongoDB](https://www.mongodb.com) on your server or a free server from \n[MongoDB Atlas](https://www.mongodb.com/cloud/atlas). (I recommend Atlas as I used it during\ndevelopment with no issues.)\n\n* [carbon-now-cli](https://github.com/mixn/carbon-now-cli) on your server too generate code images for the\n[carbon.py](/userbot/plugins/carbon.py) module. I use this CLI tool cause I don't know and couldn't get selenium\nand chromedriver to work nicely on my server/code. I'll be nice and even give you the command to install this.\nI assume you already have NPM installed. \n    ```\n    Windows: npm install -g carbon-now-cli\n    Linux: sudo npm install -g carbon-now-cli --unsafe-perm=true --allow-root\n    MacOS: I assume almost the same as linux ¯\\_(ツ)_/¯\n    ``` \n\n## Installation and Deployment\n*The way I deploy*\n```bash\ngit clone https://github.com/athphane/userbot.git\ncd userbot\nvirtualenv venv\nsource venv/bin/activate\npip install -r requirements.txt\npython -m userbot\n```\n*Using docker*\n- Save the following content as `docker-compose.yml`\n```yml\nversion: '3.5'\nservices:\n  userbot:\n    hostname: userbot\n    volumes:\n      - ./config:/root/userbot/config\n    image: ghcr.io/athphane/userbot:latest\n\n```\n- First run:\n```bash\ndocker compose run --rm userbot python -m userbot\n```\n- Configure userbot and stop container **CTRL+C**\n- Run the container again de-attached:\n```bash\ndocker compose up -d\n```\n## Spotify integration\nTo get the Spotify commands working on the Userbot, you need to get a CLIENT_ID and CLIENT_SECRET\nform the [Spotify Developer Portal]('https://developer.spotify.com/dashboard/applications) and add\nthem into your userbot.ini file.\n\nOn the Spotify developer portal, make sure to set your application `Redirect URI` to \n'http://localhost:8888/callback'. \n\nNow is a good time \nThen go ahead and run the command `python spotify.py` \nin the projects root directory. \n\nThis will create a file called `.cache-yourusername`. You need to transfer this file to the\nproject root of the server that will be running your userbot. This is a one time setup.\n\n\n## Known issues\n* `.restart` command do not work on Termux as [psutils is not supported on Android](https://github.com/giampaolo/psutil/issues/913). \\\nCTRL+C, run `git pull` and `python -m userbot` to update bot on termux.\n\n## Star History\n\n\u003ca href=\"https://star-history.com/#athphane/userbot\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=athphane/userbot\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=athphane/userbot\u0026type=Date\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=athphane/userbot\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n\n## Credits, and Thanks to\n*  [Dan](https://t.me/haskell) for his [Pyrogram Library](https://github.com/pyrogram/pyrogram)\n*  [Colin Shark](https://t.me/ColinShark) for his [PyroBot](https://git.colinshark.de/PyroBot/PyroBot) which helped with\nmost of the useful functions used.\n*  The people at [MyPaperPlane](https://github.com/MyPaperPlane) for their [Telegram-UserBot](https://github.com/MyPaperPlane/Telegram-UserBot)\nthat gave a ton of ideas on how and what modules to include in this userbot.\n*  [Baivaru](https://github.com/baivaru) for the ton of help that got me this far into making this repo.\n---\n\u003cp align=\"center\"\u003eMade with love from the Maldives ❤\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathphane%2Fuserbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathphane%2Fuserbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathphane%2Fuserbot/lists"}