-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,53 @@ | ||
## Soon. | ||
<img src="https://raw.githubusercontent.com/7n2/nothing/main/tgbot.jpg" alt="tgram" /> | ||
<p align="center"> | ||
<b>A Very friendly BOT API library for python devs.</b> | ||
<br> | ||
<a href="https://t.me/tgbot_channel"> | ||
Channel | ||
</a> | ||
• | ||
<a href="https://t.me/tgbot_chat"> | ||
Chat | ||
</a> | ||
</p> | ||
|
||
# tgram [](https://pypi.org/project/tgram/) [](https://pepy.tech/project/tgram) | ||
|
||
#### Example Usage | ||
```python | ||
from tgram import TgBot, filters | ||
from tgram.types import Message | ||
|
||
bot = TgBot("TOKEN") | ||
|
||
@bot.on_message(filters.text) | ||
async def on_message(bot: TgBot, message: Message) -> Message: | ||
#Echo | ||
return await bot.send_message( | ||
message.chat.id, | ||
message.text, | ||
entities=message.entities | ||
) | ||
``` | ||
|
||
## TODO | ||
- Bound methods for types. | ||
- Smart plugins with auto load. | ||
|
||
## Requirements | ||
- Python 3.8 or higher. | ||
- A [Telegram BOT Token](https://core.telegram.org/bots/tutorial#obtain-your-bot-token). | ||
|
||
## How to install? | ||
Here's how to install the tgram lib, the commands are given below: | ||
|
||
``` bash | ||
# With Git | ||
pip install git+https://github.com/2ei/tgram -U | ||
|
||
# With PyPi (Recommended) | ||
pip install tgram -U | ||
``` | ||
|
||
## LICENSE | ||
[MIT](https://github.com/2ei/tgram?tab=MIT-1-ov-file) |