{"id":26218461,"url":"https://github.com/mastercruelty/my-tg-app","last_synced_at":"2025-04-15T23:48:53.418Z","repository":{"id":46170988,"uuid":"302356889","full_name":"MasterCruelty/my-tg-app","owner":"MasterCruelty","description":"Several scripts for a Telegram user bot made in python. Based on Pyrogram","archived":false,"fork":false,"pushed_at":"2025-01-07T23:17:27.000Z","size":210,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T02:51:29.191Z","etag":null,"topics":["commands","pyrogram","python","scripting","telegram","telegram-bot-api","telegram-userbot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MasterCruelty.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":"2020-10-08T13:53:38.000Z","updated_at":"2025-01-07T23:17:30.000Z","dependencies_parsed_at":"2023-11-28T10:28:16.882Z","dependency_job_id":"7d4bba0a-fdd6-4f8e-8832-3918b7dc9e50","html_url":"https://github.com/MasterCruelty/my-tg-app","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/MasterCruelty%2Fmy-tg-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterCruelty%2Fmy-tg-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterCruelty%2Fmy-tg-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterCruelty%2Fmy-tg-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasterCruelty","download_url":"https://codeload.github.com/MasterCruelty/my-tg-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173060,"owners_count":21224481,"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":["commands","pyrogram","python","scripting","telegram","telegram-bot-api","telegram-userbot"],"created_at":"2025-03-12T13:17:08.504Z","updated_at":"2025-04-15T23:48:53.402Z","avatar_url":"https://github.com/MasterCruelty.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![License](https://img.shields.io/github/license/MasterCruelty/my-tg-app)\n[![image](https://img.shields.io/github/stars/MasterCruelty/my-tg-app)](https://github.com/MasterCruelty/my-tg-app/stargazers)\n[![image](https://img.shields.io/github/forks/MasterCruelty/my-tg-app)](https://github.com/MasterCruelty/my-tg-app/network/members)\n![CodeSize](https://img.shields.io/github/languages/code-size/MasterCruelty/my-tg-app)\n[![image](https://img.shields.io/github/issues/MasterCruelty/my-tg-app)](https://github.com/MasterCruelty/my-tg-app/issues)\n![image](https://img.shields.io/github/languages/top/MasterCruelty/my-tg-app)\n![image](https://img.shields.io/github/commit-activity/w/MasterCruelty/my-tg-app)\n![image](https://img.shields.io/github/contributors/MasterCruelty/my-tg-app)\n\n# my-tg-app\n\n**IT/ENG**\n\n\n# **[IT]**\n\n# Come impostare\n\nPer un corretto funzionamento è necessario compilare a dovere il file ```config.json```. Quindi è necessario essere in possesso dei seguenti dati:\n\n* Api keys di Telegram: ```api_id``` e ```api_hash```. Puoi generarle da [qui](https://my.telegram.org/apps)\n* Api url atm se si vogliono usare le loro api: ```api_url``` e ```api_get```. (Non essendo pubbliche non le condividerò)\n* I dati telegram dell'amministratore del bot: ```id_super_admin```.\n* Il percorso dove si trova il file .db: ```path_db```.\n* Nome della sessione: ```session_name```.\n* I nomi dei comandi utente, admin e superadmin: ```user_commands```, ```admin_commands``` e ```super_admin_commands```.\n\nI dati del super admin servono a colui che potrà usare le funzioni di interazione con il database e altre funzioni particolari.\nI nomi dei comandi da inserire nel ```config.json``` possono essere ricopiati dal codice oppure possono essere modificati sul codice e poi ricopiati nel file json.\t\n\n### Come funzionano i comandi utente dello userbot\n\nIl funzionamento dei comandi è spiegato all'interno del file ```help.json```. Si tratta del file che viene usato dallo userbot per rispondere al comando ```/help \u003cnome comando\u003e```.\nLe spiegazioni sono in Italiano, ma volendo si possono tradurre in qualsiasi lingua sostituendo i campi della struttura dati oppure addirittura renderlo multilingua, ma in quel caso c'è da sviluppare la componente che rende possibile il cambio di lingua.\n\n### Come funzionano i comandi admin e super\n\n* registrare un nuovo utente: ```/setuser``` \u003cid_utente\u003e\n* registrare un nuovo admin: ```/setadmin``` \u003cid_utente\u003e \n* cancellare un utente: ```/deluser``` \u003cid_utente\u003e\n* revocare i privilegi admin: ```/deladmin``` \u003cid_utente\u003e (l'utente sarà comunque ancora tra i registrati ma senza i poteri admin)\n* mostrare tutti gli utenti registrati: ```/listuser```\n* mostrare il numero di utenti registrati: ```/alluser```\n* verificare se il bot è online: ```/ping```\n* inviare un file dalla macchina locale: ```/send``` 'path'\n* eseguire un file bash dalla macchina locale: ```/exec``` 'path'\n\n\n### Dipendenze\n\n* Pyrogram\n* geopy\n* bs4\n* wikipedia\n* wikipedia-api\n* utils_config\n* openrouteservice\n* gtts\n* peewee\n\n### Progetti esterni usati\n\n* [Pyrogram](https://github.com/pyrogram/pyrogram)\n* [Covid19 dati Italiani sui casi](https://github.com/pcm-dpc/COVID-19)\n* [Geopy](https://github.com/geopy/geopy)\n* [Wikipedia wrapper](https://github.com/goldsmith/Wikipedia)\n* [Another Wikipedia wrapper](https://github.com/martin-majlis/Wikipedia-API)\n* [Peewee](https://github.com/coleifer/peewee)\n\n# **[ENG]**\n\n# How to setup\n\nThe correct way to setup this bot is to compile the file  ```config.json```. So it's necessary to have these data:\n\n* Telegram api keys: ```api_id``` e ```api_hash```. You can generate them [here](https://my.telegram.org/apps)\n* Atm api url if you wanna use their api: ```api_url``` e ```api_get```. (The api are not public so I won't share them here)\n* Telegram data of the owner of the bot: ```id_super_admin```.\n* The path where is the .db file: ```path_db```.\n* The session name: ```session_name```.\n* Name of user commands, admin commands and super admin commands: ```user_commands```, ```admin_commands``` e ```super_admin_commands```.\n\nData of super admin is needed because he's the only one who can use db functions and other special functions.\nName of commands to put inside ```config.json``` can be copied from source code or renamed inside source code and then copied in json file.\t\n\n### How the userbot's commands works\n\nThe features of the commands are explained inside ```help.json```. It is the file which is used by the userbot to reply at ```/help \u003ccommand name\u003e```.\nThis json file is only in Italian, but you can translate it in every languages by changing the correct fields with your translations or even making the userbot multi-language but in that case you have to develop the component for change the language runtime.\n\n### How the admin/super commands works\n\n* register a new user: ```/setuser``` \u003cid_user\u003e\n* register a new admin: ```/setadmin``` \u003cid_user\u003e \n* delete a user: ```/deluser``` \u003cid_user\u003e\n* delete an admin: ```/deladmin``` \u003cid_user\u003e (it will just revoke the admin power, it doesn't delete the user)\n* How to list all user registered: ```/listuser``` \n* How to show ho many users are registered: ```/alluser```\n* check if the bot is online: ```/ping```\n* send a file from local machine: ```/send``` 'path'\n* execute a bash file from your local machine: ```/exec``` 'path'\n\n\n\n### Dependencies\n\n* Pyrogram\n* geopy\n* bs4\n* wikipedia\n* wikipedia-api\n* utils_config\n* openrouteservice\n* gtts\n* peewee\n\n### External projects used\n\n* [Pyrogram](https://github.com/pyrogram/pyrogram)\n* [Covid19 cases Italian data](https://github.com/pcm-dpc/COVID-19)\n* [Geopy](https://github.com/geopy/geopy)\n* [Wikipedia wrapper](https://github.com/goldsmith/Wikipedia)\n* [Another Wikipedia wrapper](https://github.com/martin-majlis/Wikipedia-API)\n* [Peewee](https://github.com/coleifer/peewee)\n* [Peewee](https://github.com/coleifer/peewee)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercruelty%2Fmy-tg-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastercruelty%2Fmy-tg-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercruelty%2Fmy-tg-app/lists"}