diff options
| author | 2021-04-20 15:46:30 -0400 | |
|---|---|---|
| committer | 2021-04-20 15:46:30 -0400 | |
| commit | cda51f67c08df73951faa960858d72da281cfb74 (patch) | |
| tree | c60925226262cbca2ccf6a3db139dff669aa2831 /bot/exts/evergreen/speedrun.py | |
| parent | Clean Up Christmas Season (diff) | |
| parent | chore: ctx.channel.send -> ctx.send (diff) | |
Merge branch 'spring-cleanup' of https://github.com/ToxicKidz/sir-lancebot into spring-cleanup
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/evergreen/speedrun.py | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/bot/exts/evergreen/speedrun.py b/bot/exts/evergreen/speedrun.py index 21aad5aa..bf6f2117 100644 --- a/bot/exts/evergreen/speedrun.py +++ b/bot/exts/evergreen/speedrun.py @@ -5,6 +5,8 @@ from random import choice  from discord.ext import commands +from bot.bot import Bot +  log = logging.getLogger(__name__)  with Path('bot/resources/evergreen/speedrun_links.json').open(encoding="utf8") as file:      LINKS = json.load(file) @@ -13,15 +15,12 @@ with Path('bot/resources/evergreen/speedrun_links.json').open(encoding="utf8") a  class Speedrun(commands.Cog):      """Commands about the video game speedrunning community.""" -    def __init__(self, bot: commands.Bot): -        self.bot = bot -      @commands.command(name="speedrun")      async def get_speedrun(self, ctx: commands.Context) -> None:          """Sends a link to a video of a random speedrun."""          await ctx.send(choice(LINKS)) -def setup(bot: commands.Bot) -> None: +def setup(bot: Bot) -> None:      """Load the Speedrun cog."""      bot.add_cog(Speedrun(bot)) | 
