# 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()
```
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()
```
Release files for teleg-api-bot 0.0.111
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| teleg-api-bot-0.0.111.tar.gz | 19.6 kB | Details |
Release files / teleg-api-bot-0.0.111.tar.gz
| Download URL | teleg-api-bot-0.0.111.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7670446ce698f976088f645b564194710f766a198710241a813d14424d675eb
|
|
BLAKE2b-256 checksum How to use checksums |
96eb395b00348565d98157c715c92f844d8f66fbccd9f2142bcfa1df22e4d43a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |