🔋 A framework for building bots
# quick example of a ping pong bot
from bottery.conf.patterns import DefaultPattern, Pattern
async def pong(message):
return "pong!"
async def not_found(message):
return "Sorry, I didn't understand you :/"
patterns = [
Pattern('ping', pong),
DefaultPattern(not_found),
]
The complete example can be seen here.
$ pip install bottery
$ bottery startproject librarybot
$ bottery run --debug
Please see our contribution guide.