Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
/ TGramBot Public archive

TGramBot is a partially auto-generated and asynchronous Minimal Telegram Bot API framework in Python for bots

License

Notifications You must be signed in to change notification settings

KeralaBots/TGramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TGramBot

TGramBot is a partially auto-generated and asynchronous Minimal Telegram Bot API framework in Python for bots

This library is inspired by a number of other libraries:

Special thanks to Paul Larsen for his libraries

This Library is still in its Alpha phase

Most of the methods and types using in this library are auto-generated by scraping the official documentation of Telegram Bot Api

So the chance of getting bugs and errors are high. So please let us know through the issue section about the bug you have encountered.

Installing..

pip3 install tgrambot

Example

import asyncio

from tgrambot import Bot
from tgrambot.filters import Filters
from tgrambot.types import Message
from tgrambot.text import Italic


bot = Bot("token", workers=50, parse_mode='MarkdownV2')

@bot.on_message(Filters.command('start'))
async def start_bot(c: Bot, m: Message):
    await c.send_message(m.chat.id, Italic("Hola Amigo!"))

async def main():
    await bot.run()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Examples

More examples are published in the example directory

About

TGramBot is a partially auto-generated and asynchronous Minimal Telegram Bot API framework in Python for bots

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages