diff options
| author | 2019-08-09 16:17:01 -0400 | |
|---|---|---|
| committer | 2019-08-09 16:17:01 -0400 | |
| commit | 654bf0794ee56653739f468101cd0595dbca2495 (patch) | |
| tree | 373269a6dcff2be7ec24aa9b708c4ddd0a90bab9 | |
| parent | added speedrun cog and its resource (diff) | |
Cleaned up lint issues with speedrun
| -rw-r--r-- | bot/seasons/evergreen/speedrun.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bot/seasons/evergreen/speedrun.py b/bot/seasons/evergreen/speedrun.py index 8bbbfc83..e3ecdca2 100644 --- a/bot/seasons/evergreen/speedrun.py +++ b/bot/seasons/evergreen/speedrun.py @@ -1,17 +1,17 @@ import json import logging +from pathlib import Path from random import choice + + from discord.ext import commands -from pathlib import Path log = logging.getLogger(__name__) class Speedrun(commands.Cog): - """ - A command that will link a random speedrun video from youtube to Discord. - """ + """A command that will link a random speedrun video from youtube to Discord.""" def __init__(self, bot): self.bot = bot @@ -20,9 +20,9 @@ class Speedrun(commands.Cog): async def get_speedrun(self, ctx): """ Sends a link to Discord of a random speedrun from youtube. + Utilizes speedrun_links.json to find links. """ - with open(Path('bot/resources/evergreen/speedrun_links.json')) as file: data = json.load(file) links = data['links'] @@ -30,5 +30,6 @@ class Speedrun(commands.Cog): def setup(bot): + """Cog load""" bot.add_cog(Speedrun(bot)) log.info("Speedrun cog loaded") |