Skip to main content

Wrapper to Telegram bots API

Project description

# teleg-api-bot

Telegram Api for new bot system

## Getting started

This project uses Python 3, so you should probably install that, if you haven't already.

You should probably take a look at our [Getting Started](https://github.com/LibreLabUCM/teleg-api-bot/wiki/Getting-started-with-the-Telegram-Bot-API) wiki page.

## Usage

Dependencies: Python 3.4, py-yaml

"main.py" is the main file to run. It is an example of a bot.

Example bot:

```python

#!/usr/bin/python
from telegbot import telegbot
from logger import logger
logger = logger()
import time,json

def receive_message(msg):
if msg["date"] < time.time() - 2:
return # old
logger.msg(msg)
if msg["text"] == "/help":
bot.sendMessage(msg["chat"]["id"], "Text")


bot = telegbot('TOKEN')
bot.on_receive_message = receive_message
bot.run()

```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for teleg-api-bot, version 0.0.111
Filename, size File type Python version Upload date Hashes
Filename, size teleg-api-bot-0.0.111.tar.gz (19.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page