Skip to content

Instantly share code, notes, and snippets.

@gbin
Created October 4, 2015 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbin/35c59b6ad3827cf28d68 to your computer and use it in GitHub Desktop.
Save gbin/35c59b6ad3827cf28d68 to your computer and use it in GitHub Desktop.
Errbot recipes: Webhooks
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)
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