{"id":21546665,"url":"https://github.com/sazumivicky/tbot","last_synced_at":"2025-03-18T01:01:57.498Z","repository":{"id":222954705,"uuid":"758833853","full_name":"SazumiVicky/tbot","owner":"SazumiVicky","description":"This Telegram bot is built using Telethon and is designed to handle various commands. The bot has a modular structure, where each command is defined in a separate Python file in the src/cmd directory.","archived":false,"fork":false,"pushed_at":"2024-02-17T08:21:27.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T09:12:47.172Z","etag":null,"topics":["sazumi","sazumiviki","telegram","telegram-bot","telethon","telethon-bot"],"latest_commit_sha":null,"homepage":"https://sazumi.moe","language":"Python","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/SazumiVicky.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}},"created_at":"2024-02-17T08:01:01.000Z","updated_at":"2024-12-09T14:32:12.000Z","dependencies_parsed_at":"2024-02-17T09:22:44.697Z","dependency_job_id":"e37ee24d-24ce-447e-b42c-49f4d91f8f97","html_url":"https://github.com/SazumiVicky/tbot","commit_stats":null,"previous_names":["sazumivicky/tbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Ftbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Ftbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Ftbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Ftbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SazumiVicky","download_url":"https://codeload.github.com/SazumiVicky/tbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135891,"owners_count":20403797,"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":["sazumi","sazumiviki","telegram","telegram-bot","telethon","telethon-bot"],"created_at":"2024-11-24T06:12:56.476Z","updated_at":"2025-03-18T01:01:57.233Z","avatar_url":"https://github.com/SazumiVicky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This Telegram bot is built using Telethon and is designed to handle various commands. The bot has a modular structure, where each command is defined in a separate Python file in the `src/cmd` directory.\n\n### Commands\n\nHere's a list of available commands:\n\n- `/menu`: Displays a list of all available commands. The bot will greet the user and provide a list of commands in an easy-to-read format.\n- `/ping`: The bot will respond with a message \"Pong!\".\n\n### Setup and Usage\n\n1. Copy the `.env.example` file to a new file named `.env`.\n2. Fill in `API_ID` and `API_HASH` in the `.env` file with your Telegram API details.\n3. Run the bot with the command `python main.py`.\n\n### Adding New Commands\n\nTo add a new command, follow these steps:\n\n1. Create a new Python file in the `src/cmd` directory. For example, `src/cmd/hello.py`.\n2. Inside this file, define a `handle` function that will be called when the command is received. This function should take two arguments: `event` and `client`.\n3. Inside the `handle` function, you can write the logic to handle the command.\n4. Define a `cmd_info` dictionary that contains details about the command. This should include a `cmd` key that specifies the command text, and can also include other keys such as `help` and `category`.\n\nHere's an example of a new command:\n\n```python\nasync def handle(event, client):\n    await client.send_message(event.message.to_id, \"Hello, world!\")\n\ncmd_info = {\n    \"cmd\": \"/hello\",\n    \"help\": \"Sends a 'Hello, world!' message\",\n    \"category\": \"main\",\n}\n```\n### Contributor \n\n- [Sazumi Viki](https://instagram.com/moe.sazumiviki)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsazumivicky%2Ftbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsazumivicky%2Ftbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsazumivicky%2Ftbot/lists"}