aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Kronifer <[email protected]>2021-03-03 09:57:07 -0600
committerGravatar GitHub <[email protected]>2021-03-03 09:57:07 -0600
commita2c68caf0e39e6947372d303dcc707f26f1a744f (patch)
treea95943f35cc4a55f27fb72711b6b6e28ca98d72b
parentUpdate earth_photos.py (diff)
Update earth_photos.py
-rw-r--r--bot/exts/easter/earth_photos.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/bot/exts/easter/earth_photos.py b/bot/exts/easter/earth_photos.py
index 52bbaf36..adae0dcd 100644
--- a/bot/exts/easter/earth_photos.py
+++ b/bot/exts/easter/earth_photos.py
@@ -20,10 +20,18 @@ class EarthPhotos(commands.Cog):
async with ctx.typing():
async with aiohttp.ClientSession as session:
async with session.get(
- 'https://api.unsplash.com/photos/random?query=earth&client_id=' + UnClientId
- ) as r:
+ 'https://api.unsplash.com/photos/random?query=earth&client_id=' + UnClientId) as r:
jsondata = await r.json()
- await ctx.send("Still a placeholder")
+ linksdata = jsondata.get("urls")
+ downloadlinksdata = jsondata.get("links")
+ async with session.get(
+ downloadlinksdata.get("download_location") + "?client_id=" + UnClient_id) as er:
+ pass
+ await ctx.send("Still a work in progress")
+
+
+
+