diff options
Diffstat (limited to 'bot/exts')
| -rw-r--r-- | bot/exts/easter/egg_decorating.py | 6 | ||||
| -rw-r--r-- | bot/exts/evergreen/fun.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/spookynamerate.py | 4 | 
3 files changed, 6 insertions, 6 deletions
| diff --git a/bot/exts/easter/egg_decorating.py b/bot/exts/easter/egg_decorating.py index 6201d424..fb5701c4 100644 --- a/bot/exts/easter/egg_decorating.py +++ b/bot/exts/easter/egg_decorating.py @@ -4,7 +4,7 @@ import random  from contextlib import suppress  from io import BytesIO  from pathlib import Path -from typing import Union +from typing import Optional, Union  import discord  from PIL import Image @@ -33,7 +33,7 @@ class EggDecorating(commands.Cog):      """Decorate some easter eggs!"""      @staticmethod -    def replace_invalid(colour: str) -> Union[int, None]: +    def replace_invalid(colour: str) -> Optional[int]:          """Attempts to match with HTML or XKCD colour names, returning the int value."""          with suppress(KeyError):              return int(HTML_COLOURS[colour], 16) @@ -44,7 +44,7 @@ class EggDecorating(commands.Cog):      @commands.command(aliases=("decorateegg",))      async def eggdecorate(          self, ctx: commands.Context, *colours: Union[discord.Colour, str] -    ) -> Union[Image.Image, None]: +    ) -> Optional[Image.Image]:          """          Picks a random egg design and decorates it using the given colours. diff --git a/bot/exts/evergreen/fun.py b/bot/exts/evergreen/fun.py index 1783d7b4..fd17a691 100644 --- a/bot/exts/evergreen/fun.py +++ b/bot/exts/evergreen/fun.py @@ -192,7 +192,7 @@ class Fun(Cog):          Returns a tuple of:              str: If `text` is a valid discord Message, the contents of the message, else `text`. -            Union[Embed, None]: The embed if found in the valid Message, else None +            Optional[Embed]: The embed if found in the valid Message, else None          """          embed = None diff --git a/bot/exts/halloween/spookynamerate.py b/bot/exts/halloween/spookynamerate.py index 3d6d95fa..bab79e56 100644 --- a/bot/exts/halloween/spookynamerate.py +++ b/bot/exts/halloween/spookynamerate.py @@ -6,7 +6,7 @@ from datetime import datetime, timedelta  from logging import getLogger  from os import getenv  from pathlib import Path -from typing import Union +from typing import Optional  from async_rediscache import RedisCache  from discord import Embed, Reaction, TextChannel, User @@ -355,7 +355,7 @@ class SpookyNameRate(Cog):          return embed -    async def get_channel(self) -> Union[TextChannel, None]: +    async def get_channel(self) -> Optional[TextChannel]:          """Gets the sir-lancebot-channel after waiting until ready."""          await self.bot.wait_until_ready()          channel = self.bot.get_channel( | 
