diff options
| author | 2021-04-19 17:04:11 -0400 | |
|---|---|---|
| committer | 2021-04-19 17:04:11 -0400 | |
| commit | ae64ddd3e7d731a44a1684c93d67ea6334b120d2 (patch) | |
| tree | 8373f0171385d4065157ce0a4db5e686769ef272 /bot/exts/halloween/monsterbio.py | |
| parent | Merge pull request #673 from janine9vn/int-eval (diff) | |
Clean Up the Halloween Season
- Change commands.Bot type hints to bot.Bot
- Remove the setting of Cog.bot if it isn't being used
- Use Bot.http_session instead of creating new ones
- Keep string quotes and Doc-Strings consistant
- Remove redundant/outdated code
Ignored spookyavatar.py as it is being moved in another PR.
Diffstat (limited to 'bot/exts/halloween/monsterbio.py')
| -rw-r--r-- | bot/exts/halloween/monsterbio.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bot/exts/halloween/monsterbio.py b/bot/exts/halloween/monsterbio.py index 016a66d1..f484305d 100644 --- a/bot/exts/halloween/monsterbio.py +++ b/bot/exts/halloween/monsterbio.py @@ -6,6 +6,7 @@ from pathlib import Path import discord from discord.ext import commands +from bot.bot import Bot from bot.constants import Colours log = logging.getLogger(__name__) @@ -17,9 +18,6 @@ with open(Path("bot/resources/halloween/monster.json"), "r", encoding="utf8") as class MonsterBio(commands.Cog): """A cog that generates a spooky monster biography.""" - def __init__(self, bot: commands.Bot): - self.bot = bot - def generate_name(self, seeded_random: random.Random) -> str: """Generates a name (for either monster species or monster name).""" n_candidate_strings = seeded_random.randint(2, len(TEXT_OPTIONS["monster_type"])) @@ -50,6 +48,6 @@ class MonsterBio(commands.Cog): await ctx.send(embed=embed) -def setup(bot: commands.Bot) -> None: - """Monster bio Cog load.""" - bot.add_cog(MonsterBio(bot)) +def setup(bot: Bot) -> None: + """Load the Monster Bio Cog.""" + bot.add_cog(MonsterBio()) |