hellodhlyn / telegrambot-py

Make your own telegram bot easily

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build status Coverage PyPI PyPI - Python Version License

telegrambot-py

Make your own telegram bot easily.

Getting Started

Before starting, you need to create a bot and get a token for it. For details, see instructions here.

Below is the example code that responds 'pong' for '/ping' command.

from telegrambot import Bot

bot = Bot('your_bot_token')

@bot.command('/ping {name}')
def ping(ctx, name):
    return "Hello, {}".format(name)

bot.start()

Development

Prerequsites

  • Python 3.5 or greater
  • Pipenv

Install dependencies

pipenv install --dev

Running Tests

pipenv run lint
pipenv run test

Deployment

pipenv run package

About

Make your own telegram bot easily

License:MIT License


Languages

Language:Python 100.0%