aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/easter/earth_photos.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/easter/earth_photos.py')
-rw-r--r--bot/exts/easter/earth_photos.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/easter/earth_photos.py b/bot/exts/easter/earth_photos.py
index 9df4f9ca..f65790af 100644
--- a/bot/exts/easter/earth_photos.py
+++ b/bot/exts/easter/earth_photos.py
@@ -9,6 +9,8 @@ from bot.constants import Tokens
log = logging.getLogger(__name__)
+API_URL = "https://api.unsplash.com/photos/random"
+
class EarthPhotos(commands.Cog):
"""This cog contains the command for earth photos."""
@@ -21,7 +23,7 @@ class EarthPhotos(commands.Cog):
"""Returns a random photo of earth, sourced from Unsplash."""
async with ctx.typing():
async with self.bot.http_session.get(
- "https://api.unsplash.com/photos/random",
+ API_URL,
params={"query": "planet_earth", "client_id": Tokens.unsplash_access_key}
) as r:
jsondata = await r.json()