This is a cool recipe to create your own kickass bot.
So, I wanted to create a telegram bot to joke around, here is the result. This is somewhat an ongoing project so I'm sure it will be broken from time to time. Most interaction is in spanish, feel free to fork it and change whatever the hell you want.
- You'll need your own telgram bot token (you can make your own using @Botfather)
- Create
config.py
file and just put theretoken = 'your_token_goes_here'
. - Go to your favorite terminal, enable the virtualenv and
python telebotcho.py
.
There you go.
If you say Hola bebotcho
he will answer back!
Same way as before but this time the trigger is anything that contains buenos d
(as in buenos días
in spanish) I was too lazy to regex this shit, maybe in the future.
Using the FOAAS python wrapper, Bebotcho knows when life sucks! just tell him anything containing fml
and bebotcho
in the same message.
Big kudos to the python wrapper for Telegram API Telepot and Fuck Off As A Service!