Skip to content

DevPGSV/teleg-api-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teleg-api-bot

Telegram Api for new bot system

This proyect has been moved to https://github.com/LibreLabUCM/teleg-api-bot

Dependencies: py-yaml

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

Example bot:

#!/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()
bot.on_receive_message = receive_message
bot.run()

About

Telegram Api for new bot system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages