diff options
| author | 2021-05-15 13:31:34 -0400 | |
|---|---|---|
| committer | 2021-05-15 13:31:34 -0400 | |
| commit | f8a179df350eb3abb7f3595aaff3dbca312f540c (patch) | |
| tree | 6868ae98b81b614f8d8d68f1a9bbc06c7cb94490 /bot/exts/easter/earth_photos.py | |
| parent | chore: Make all aliases in commands tuples (diff) | |
chore: Make things that are only used once constants
Diffstat (limited to 'bot/exts/easter/earth_photos.py')
| -rw-r--r-- | bot/exts/easter/earth_photos.py | 4 |
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() |