|
@@ -219,17 +219,31 @@ def selfie(message):
|
|
|
|
|
|
return run_upload(message, r.content)
|
|
|
|
|
|
+
|
|
|
@as_plugin
|
|
|
def cat(message):
|
|
|
if message.raw_args is not None and "!explain" in message.raw_args:
|
|
|
- return "The !cat grabs a cat from https://thiscatdoesnotexist.com/"
|
|
|
+ return "The !cat command grabs a cat from https://thiscatdoesnotexist.com/"
|
|
|
try:
|
|
|
r = requests.get("https://thiscatdoesnotexist.com/", headers={ "User-Agent": "Rollbot" })
|
|
|
except ConnectionError as e:
|
|
|
return RollbotFailure.SERVICE_DOWN.with_reason("Could not reach cat generator.").with_exception(e)
|
|
|
|
|
|
return run_upload(message, r.content)
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+@as_plugin
|
|
|
+def npc(message):
|
|
|
+ if message.raw_args is not None and "!explain" in message.raw_args:
|
|
|
+ return "The !npc command grabs a person from https://thispersondoesnotexist.com/"
|
|
|
+ try:
|
|
|
+ r = requests.get("https://thispersondoesnotexist.com/image", headers={ "User-Agent": "Rollbot" })
|
|
|
+ except ConnectionError as e:
|
|
|
+ return RollbotFailure.SERVICE_DOWN.with_reason("Could not reach person generator.").with_exception(e)
|
|
|
+
|
|
|
+ return run_upload(message, r.content)
|
|
|
+
|
|
|
+
|
|
|
@as_plugin
|
|
|
def imagine(message):
|
|
|
if message.raw_args is None:
|
|
@@ -253,6 +267,7 @@ def imagine(message):
|
|
|
|
|
|
return RollbotResponse(message, img=result)
|
|
|
|
|
|
+
|
|
|
art_number = 0
|
|
|
|
|
|
@as_plugin
|