Prechádzať zdrojové kódy

Merge branch 'appreciate' of iramo94/rollbot3-with-the-house into master

kirkleon 6 rokov pred
rodič
commit
5c40a08334
2 zmenil súbory, kde vykonal 23 pridanie a 0 odobranie
  1. 1 0
      config/config.toml
  2. 22 0
      src/plugins/the_house.py

+ 1 - 0
config/config.toml

@@ -10,6 +10,7 @@ querying = [ "inspire", "shield", "scp", "riddle" ]
 seychelles = [ "seychelles" ]
 curse = [ "curse", "bless" ]
 the_guy = [ "the_guy" ]
+the_house = [ "the_house" ]
 
 [aliases]
 speemteek = "speamteek"

+ 22 - 0
src/plugins/the_house.py

@@ -0,0 +1,22 @@
+from command_system import RollbotResponse, RollbotFailure, as_plugin
+
+housetop = """\
+┏┓
+┃┃╱╲ In this
+┃╱╱╲╲ house
+╱╱╭╮╲╲ we love
+▔▏┗┛▕▔ & appreciate
+╱▔▔▔▔▔▔▔▔▔▔╲
+"""
+
+housebot = """
+╱╱┏┳┓╭╮┏┳┓ ╲╲
+▔▏┗┻┛┃┃┗┻┛▕▔
+"""
+
+@as_plugin("appreciate")
+def the_house(db, msg):
+    
+    thehouse = housetop + ' '.join(list(msg.args(normalize=False))) + housebot
+
+    return RollbotResponse(msg, txt=thehouse)