Skip to main content

A Telegram bot library, with simple route decorators.

Project description

A Telegram bot library, with simple route decorators.

Currently a work in progress, doesn’t do much now, but will register and send messages.

Example Setup

from telebot import TeleBot

app = TeleBot(__name__)

@app.route('/command ?(.*)')
def example_command(message, cmd):
    chat_dest = message['chat']['id']
    msg = "Command Recieved: {}".format(cmd)

    app.send_message(chat_dest, msg)

def parrot(message):
   chat_dest = message['chat']['id']
   user_msg = message['text']

   msg = "Parrot Says: {}".format(user_msg)
   app.send_message(chat_dest, msg)

if __name__ == '__main__':
    app.config['api_key'] = 'xxxxxxxx:enterYourBotKeyHereToTest'

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 telebot, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size telebot-0.0.4-py3-none-any.whl (4.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size telebot-0.0.4.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

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