Skip to content

A framework to build telegram bots using python.

License

Notifications You must be signed in to change notification settings

neunzehnhundert97/PySAMT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAMT

Warning: The underlying library telepot is discontinued, so SAMT fails when features like polls are used!

This framework on top of telepot is intended to ease the creation of simple Telegram chat bots. With a syntax as seen in web frameworks like flask, writing the bot will only be about defining what the bot will answer to certain messages, skipping the lower levels involved.

A simple example

Bot.py

from samt import Bot

bot = Bot()

@bot.answer("/start")
def start():
    return "Hello, new user, how can I help you?"
    
if __name__ == "__main__":
    bot.listen()

config/config.toml

[general]
# Sets the log level for stdout
logging = "DEBUG"

[bot]
# The Bot API token
token = "The token you got by the botfather"

Installation

The package is currently not (yet) available on PyPI, but you may download the repository as zip or by using git clone. Then you can use the setup.py to install the module locally by using pip install .. Alternatively, you can use the git integration of pip and combine boths steps into pip install git+https://github.com/neunzehnhundert97/samt.

Notes

The project is currently still under construction, so many things are intended to be added or can change from commit to commit. If you encounter bugs (which seems likely to me), want to suggest a new feature or have a general comment, feel free to contact me.

About

A framework to build telegram bots using python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published