diff options
| author | 2019-03-19 14:17:59 -0400 | |
|---|---|---|
| committer | 2019-03-19 14:17:59 -0400 | |
| commit | 74d6012bc80b93842c6081d115e87d6a8a77b95b (patch) | |
| tree | 598ac286dc06932b17a57250c39102cf03a444c9 /bot/seasons/evergreen/uptime.py | |
| parent | Docstring pass for Christmas cogs (diff) | |
Docstring pass for Evergreen cogs
Diffstat (limited to 'bot/seasons/evergreen/uptime.py')
| -rw-r--r-- | bot/seasons/evergreen/uptime.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bot/seasons/evergreen/uptime.py b/bot/seasons/evergreen/uptime.py index 1321da19..d6b59a69 100644 --- a/bot/seasons/evergreen/uptime.py +++ b/bot/seasons/evergreen/uptime.py @@ -10,18 +10,15 @@ log = logging.getLogger(__name__) class Uptime: - """ - A cog for posting the bots uptime. - """ + """A cog for posting the bot's uptime.""" def __init__(self, bot): self.bot = bot @commands.command(name="uptime") async def uptime(self, ctx): - """ - Returns the uptime of the bot. - """ + """Responds with the uptime of the bot.""" + difference = relativedelta(start_time - arrow.utcnow()) uptime_string = start_time.shift( seconds=-difference.seconds, @@ -32,7 +29,8 @@ class Uptime: await ctx.send(f"I started up {uptime_string}.") -# Required in order to load the cog, use the class name in the add_cog function. def setup(bot): + """Uptime Cog load.""" + bot.add_cog(Uptime(bot)) log.debug("Uptime cog loaded") |