|
1 | | -<p align="center"><a href="https://thecodexo.com" target="_blank" rel="noopener noreferrer"><img width="250" src="https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template/blob/main/pic/logo_transparent_1100x300.png" alt="Code xo logo"></a></p> |
| 1 | +# Pyrogram Telegram Python Bot Template |
2 | 2 |
|
3 | | -<!-- <p align='center'> |
4 | | - <img alt="GitHub Sparkline" src="https://stars.medv.io/kalanakt/Pyrogram-Telegram-Bot-Template.svg"> |
5 | | -</p> --> |
6 | | -<p align="center"> |
7 | | - <img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/kalanakt/Pyrogram-Telegram-Bot-Template?logo=files&logoColor=f72585&style=social"> |
8 | | - <img alt="GitHub release (by tag)" src="https://img.shields.io/github/downloads/kalanakt/Pyrogram-Telegram-Bot-Template/v1.0.0/total?color=90dbf4&logo=arlo&style=social"> |
9 | | - <img alt="GitHub issues" src="https://img.shields.io/github/issues-raw/kalanakt/Pyrogram-Telegram-Bot-Template?color=8eecf5&logo=anaconda&logoColor=06d6a0&style=social"> |
10 | | - <img alt="GitHub" src="https://img.shields.io/github/license/kalanakt/Pyrogram-Telegram-Bot-Template?logo=adguard&logoColor=390099&style=social"> |
11 | | - <img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/kalanakt/Pyrogram-Telegram-Bot-Template?color=90e0ef&logoColor=ff4d6d&style=social"> |
12 | | - <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/kalanakt/Pyrogram-Telegram-Bot-Template?logo=electron&logoColor=89fc00&style=social"> |
13 | | -</p> |
14 | | -<br><br> |
| 3 | +This is a template for creating Telegram bots using Pyrogram, MongoDB, and Python. |
15 | 4 |
|
16 | | -<a href="https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template/archive/refs/tags/v1.0.0.zip"><img alt="Download Zip file" src="https://img.shields.io/github/downloads/kalanakt/Pyrogram-Telegram-Bot-Template/v1.0.0/total?color=caf0f8&label=Download%20As%20Zip%20v1.0.0&logo=Files&logoColor=caf0f8&style=for-the-badge"></a> |
| 5 | +## Getting Started |
17 | 6 |
|
18 | | -<h3>This repo is for telegram bot using pyrogram libray</h3> |
19 | | -<p>This is <a href="https://thecodexo.com" target="_blank" rel="noopener noreferrer">Codexo</a> project for develop telegram bot using pyrogram</p> |
| 7 | +### Prerequisites |
20 | 8 |
|
21 | | -<h3>Introduction</h3> |
22 | | -<p>This is complete pyrogram bot. host in <a href="https://dashboard.heroku.com/" target="_blank" rel="noopener noreferrer">heroku</a>. use <a href="https://docs.pyrogram.org" target="_blank" rel="noopener noreferrer">Pyrogram Documentation</a> for develop your bot.</p> |
| 9 | +- Python 3.7 or higher |
| 10 | +- Pyrogram library |
| 11 | +- MongoDB |
23 | 12 |
|
24 | | -<h3>Ecosystem</h3> |
| 13 | +### Installing |
25 | 14 |
|
26 | | -| Version | Status | Description | |
27 | | -| -------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------- | |
28 | | -| v 1.0.0 | Stable | Simple mode & command plugin & callback plugin & database & heroku development setup & bot message script | |
29 | | -| - | - | - | |
30 | | -| - | - | - | |
| 15 | +1. Clone the repository: |
31 | 16 |
|
32 | | -<h3>To do</h3> |
| 17 | + ```bash |
| 18 | + git clone https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template telegrambot |
| 19 | + cd telegrambot |
| 20 | + ``` |
33 | 21 |
|
34 | | - * [ ] deploy to vps setup |
35 | | - * [ ] brodcast message to users |
36 | | - * [ ] users counter |
37 | | - |
38 | | -<h3>Documentation</h3> |
| 22 | +2. Install the dependencies: |
39 | 23 |
|
40 | | -<p>check out <a href="https://docs.pyrogram.org" target="_blank" rel="noopener noreferrer">pyrogram doc</a></p> |
| 24 | + ```bash |
| 25 | + pip install -r requirements.txt |
| 26 | + ``` |
41 | 27 |
|
42 | | -<h3>Questions</h3> |
| 28 | +3. Set up your MongoDB database and get the connection URI. |
43 | 29 |
|
44 | | -<p>For questions and support please use <a href="https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template/discussions" target="_blank" rel="noopener noreferrer">Discussions</a>. The issue list of this repo is <strong>exclusively</strong> for bug reports and feature requests.</p> |
| 30 | +4. Create a `.env` file in the project root and add your MongoDB connection URI and your Telegram bot token: |
45 | 31 |
|
46 | | -<h3>Issues</h3> |
| 32 | + ```plaintext |
| 33 | + DATABASE_URI=your-mongodb-connection-uri |
| 34 | + DATABASE_NAME=your-database-name |
| 35 | + API_ID=your-api-id |
| 36 | + API_HASH=your-api-hash |
| 37 | + BOT_TOKEN=your-bot-token |
| 38 | + ``` |
47 | 39 |
|
48 | | -<p>Please make sure to read the <a href="https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template/discussions/categories/issue-reporting-checklist" target="_blank" rel="noopener noreferrer">Issue Reporting Checklist</a>. before opening an <a href="https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template/issues" target="_blank" rel="noopener noreferrer">issue</a>. Issues not conforming to the guidelines may be closed immediately.</p> |
| 40 | +5. Run the bot: |
49 | 41 |
|
50 | | -<h3>Changelog</h3> |
| 42 | + ```bash |
| 43 | + python bot.py |
| 44 | + ``` |
51 | 45 |
|
52 | | -<p>Detailed changes for each release are documented in the <a href="https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template/commits/main" target="_blank" rel="noopener noreferrer">main commits</a></p> |
| 46 | +## Features |
53 | 47 |
|
54 | | -<h3>Stay In Touch</h3> |
| 48 | +- Pyrogram framework for interacting with the Telegram API. |
| 49 | +- MongoDB for storing data. |
| 50 | +- Easily extendable for adding more features. |
55 | 51 |
|
56 | | -- [Telegram](https://t.me/TMWAD) |
| 52 | +## Contributing |
57 | 53 |
|
58 | | -<h3>Contribution</h3> |
| 54 | +Contributions are welcome! Please follow the standard guidelines when contributing. |
59 | 55 |
|
60 | | -<p>If you have a pyrogram-related project/component/tool/idea, add it with a <a href="https://github.com/kalanakt/Pyrogram-Telegram-Bot-Template/pulls" target="_blank" rel="noopener noreferrer">pull request</a> Thank you to all the people who contributed to this project!</p> |
| 56 | +## License |
61 | 57 |
|
62 | | -<h3>License</h3> |
63 | | - |
64 | | -[MIT](https://opensource.org/licenses/MIT) |
65 | | - |
66 | | -<br> |
67 | | -<em align='center'>Copyright (c) 2022-present <strong>code xo</strong></em> |
| 58 | +This project is licensed under the MIT [License](LICENSE). |
0 commit comments