Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

ilovetocode2019/telegram.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

telegram.py

PyPI PyPI - Python Version Documentation Status GitHub - License Telegram Channel Telegram Group

An async API wrapper for the Telegram bot API in Python

Deprecation Notice

This library is no longer being maintained and I do not recommend using it as it is incomplete and probably buggy.

Installation

Python 3.7+ is required to install and use telegram.py.

Install the latest release from PyPI:

# Mac/Linux
python3 -m pip install telegram.py

# Windows
py -3 -m pip install telegram.py

Or install the development version from GitHub:

# Mac/Linux
python3 -m pip install git+https://github.com/ilovetocode2019/telegram.py

# Windows
py -3 -m pip install git+https://github.com/ilovetocode2019/telegram.py

Quick Example

import logging

import telegrampy
from telegrampy.ext import commands

logging.basicConfig(level=logging.INFO, format="(%(asctime)s) %(levelname)s %(message)s", datefmt="%m/%d/%y - %H:%M:%S %Z")
logger = logging.getLogger("telegrampy")

bot = commands.Bot("token here")

@bot.command()
async def hi(ctx):
    await ctx.send("Hello")

bot.run()

For a line-by-line walkthrough for this example, see the quickstart.

Documentation

Documentation can be found here.