@@ -4,8 +4,8 @@ ENV ROLLBOT_CFG_DIR /rollbot
EXPOSE 6070
ADD requirements.txt /rollbot
RUN pip install -r requirements.txt
-ADD static/ /rollbot/static
-ADD templates/ /rollbot/templates
+# ADD static/ /rollbot/static
+# ADD templates/ /rollbot/templates
ADD config/config.toml /rollbot
ADD config/secrets.toml /rollbot
ADD src/ /rollbot
@@ -1,6 +1,5 @@
old:
seychelles
-inspire
pokemon
shield
say
@@ -5,6 +5,7 @@ simple = [ "info", "isadmin", "debug", "echo", "thanks", "guess", "meme", "unmem
teamspeak = [ "teamspeak" ]
session = [ "session" ]
roll = [ "roll" ]
+querying = [ "inspire" ]
[teamspeak]
host = "kirkleon.ddns.net"
@@ -0,0 +1,26 @@
+import requests
+
+from command_system import RollbotResponse, RollbotFailure, as_plugin
+@as_plugin
+def inspire(db, message):
+ argstr = message.raw_args
+ if argstr is not None and "explain" in argstr:
+ return RollbotResponse(
+ message,
+ txt="Using the command !inspire will request an inspiration image from http://inspirobot.me/"
+ )
+ try:
+ url = requests.get("http://inspirobot.me/api?generate=true").text
+ return RollbotResponse(message, img=url)
+ except ConnectionError as e:
+ failure_reason=RollbotFailure.SERVICE_DOWN,
+ failure_notes={
+ "explain": "Could not reach inspirobot.",
+ "exception": e
+ }