diff options
| -rw-r--r-- | bot/exts/easter/earth_photos.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bot/exts/easter/earth_photos.py b/bot/exts/easter/earth_photos.py index 478502eb..2ca43e42 100644 --- a/bot/exts/easter/earth_photos.py +++ b/bot/exts/easter/earth_photos.py @@ -1,9 +1,10 @@ -import logging -import requests - import discord from discord.ext import commands +import logging + +import requests + from bot.constants import Tokens log = logging.getLogger(__name__) @@ -15,6 +16,7 @@ class EarthPhotos(commands.Cog): """This cog contains the command for earth photos.""" def init(self, bot: commands.Bot): + """Init function.""" self.bot = bot self.current_channel = None @@ -28,13 +30,13 @@ class EarthPhotos(commands.Cog): photourls = photojson.get('urls') urltosend = photourls.get('regular') userjson = photojson.get('user') - userName = userjson.get('name') + username = userjson.get('name') embed = discord.Embed(title="Earth Photo", description="A photo of Earth from Unsplash.", color=0x66ff00) embed.set_image(url=urltosend) - embed.set_footer(text="Image by " + userName + " on Unsplash.") + embed.set_footer(text="Image by " + username + " on Unsplash.") await ctx.send(embed=embed) def setup(bot: commands.Bot) -> None: - """Cog load""" + """Cog load.""" bot.add_cog(EarthPhotos(bot)) |