|
@@ -220,6 +220,17 @@ def cat(message):
|
|
|
return run_upload(message, r.content)
|
|
|
|
|
|
|
|
|
+@with_help("The !horse command grabs a cat from https://thishorsedoesnotexist.com/")
|
|
|
+@as_plugin
|
|
|
+def horse(message):
|
|
|
+ try:
|
|
|
+ r = requests.get("https://thishorsedoesnotexist.com/", headers={ "User-Agent": "Rollbot" })
|
|
|
+ except ConnectionError as e:
|
|
|
+ return RollbotFailure.SERVICE_DOWN.with_reason("Could not reach horse generator.").with_exception(e)
|
|
|
+
|
|
|
+ return run_upload(message, r.content)
|
|
|
+
|
|
|
+
|
|
|
@with_help("The !npc command grabs a person from https://thispersondoesnotexist.com/")
|
|
|
@as_plugin
|
|
|
def npc(message):
|