Skip to content

Commit

Permalink
gimme some !bitcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
shardcore committed May 16, 2014
1 parent 40604ab commit cdeee55
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
4 changes: 2 additions & 2 deletions command_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from commands import recapcommand
from commands import spookcommand
from commands import drinkcommand
from commands import bingocommand
from commands import cryptocommand


# stats
Expand All @@ -24,5 +24,5 @@
#test_message = { "Body": "#shoutout to the berlin massive" }
#print test_command.execute( test_message )

test_command = bingocommand.BingoCommand()
test_command = cryptocommand.CryptoCommand()
print test_command.generate("atom")
28 changes: 0 additions & 28 deletions command_tester.py~

This file was deleted.

32 changes: 32 additions & 0 deletions commands/cryptocommand.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=UTF-8

from string import Template
import random
from commandbase import BaseCommand

class CryptoCommand( BaseCommand ):

def __init__(self):
BaseCommand.__init__( self )
self.command_mappings = [ "crypto", "blockchain", "bitcoin" ]
self.templates = [ Template("poisons the blockchain."),
Template("fucks around with ethereum."),
Template("writes !art into the blockchain."),
Template("is all over $name coin."),
Template("is living in a charles stross novel."),
Template("likes tor"),
Template("demands payment in dogecoin"),
Template("digs the !hipster affordances of a p2p encrypted blockchain."),
Template("fogets his bitcoin password."),
Template("buys something on silk road."),
Template("encrypts $name forever."),
Template("is like upsetting the capitalist hegemony, man."),
Template("puts a virus in the blockchain."),
Template("gets !rob to explain it all.")
]


def generate( self, name ):
template = random.choice( self.templates )
message_out = template.substitute(name=name)
return "/me %s" % message_out

0 comments on commit cdeee55

Please sign in to comment.