Created
October 4, 2015 22:34
-
-
Save gbin/70e891e6c2de12b7ea08 to your computer and use it in GitHub Desktop.
Errbot recipes: Async messages
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
import random, time | |
from errbot import BotPlugin, botcmd | |
from pyfiglet import Figlet, FigletFont | |
class AsciiArt(BotPlugin): | |
""" Ascii Art related commands. """ | |
@botcmd | |
def big(self, mess, args): | |
""" Generates 3 big versions with a random font.""" | |
for font in random.sample(FigletFont.getFonts(), 3) | |
time.sleep(2) | |
yield '```\n' + Figlet(font=font).renderText(message) + '\n```' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment