aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Kronifer <[email protected]>2021-03-02 15:22:39 -0600
committerGravatar GitHub <[email protected]>2021-03-02 15:22:39 -0600
commit99a9d7a1b7651caea4cf1587c89485497c061387 (patch)
treec3949d17618b1341d320fe243b0fdd9562a8ad86
parentinitial commit of earth_photos (diff)
Update earth_photos.py
-rw-r--r--bot/exts/easter/earth_photos.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/bot/exts/easter/earth_photos.py b/bot/exts/easter/earth_photos.py
index ceffeb48..436b39a7 100644
--- a/bot/exts/easter/earth_photos.py
+++ b/bot/exts/easter/earth_photos.py
@@ -1,14 +1,24 @@
import asyncio
import logging
import random
-from unsplash.api import Api
-from unsplash.auth import Auth
+from unsplash.api import Api as uApi
+from unsplash.auth import Auth as uAuth
import discord
from discord.ext import commands
+from bot.constants import Tokens
+
log = logging.getLogger(__name__)
+UnClient_id = Tokens.UNSPLASH_API
+
+UnClient_secret = Tokens.UNSPLASH_SECRET
+
+redirect_uri = "urn:ietf:wg:oauth:2.0:oob"
+
+unsplash_auth = uAuth(client_id,
+
class EarthPhotos(commands.Cog):
"""This cog contains the command for earth photos."""
@@ -19,7 +29,7 @@ class EarthPhotos(commands.Cog):
@commands.command(aliases=["earth"])
async def earth_photos(self, ctx: commands.Context):
"""
- Returns a random photo of earth.
+ Returns a random photo of earth, sourced from Unsplash.
"""