Created
October 4, 2015 22:42
-
-
Save gbin/35c59b6ad3827cf28d68 to your computer and use it in GitHub Desktop.
Errbot recipes: Webhooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
@webhook | |
def alert(self, request): | |
msg = request['msg'] | |
self.send('gbin', "```\n" + Figlet().renderText('ALERT') + "\n```\n" + msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --data "msg=help" http://localhost:3141/alert/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment