diff options
author | 2019-09-26 18:53:40 -0700 | |
---|---|---|
committer | 2019-10-01 18:25:31 -0700 | |
commit | 2f85c87e85391091b5d2940f95912e40c208d0c7 (patch) | |
tree | 662f818e52d618ac5f9ec1eb346816386d200ecd | |
parent | Adjust type annotations of decorators (diff) |
Fix thumbnail's type annotation for ModLog.send_log_message
It may also be an Asset because when converted to a string the URL is
returned.
-rw-r--r-- | bot/cogs/modlog.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/bot/cogs/modlog.py b/bot/cogs/modlog.py index 68424d268..50cb55e33 100644 --- a/bot/cogs/modlog.py +++ b/bot/cogs/modlog.py @@ -6,7 +6,7 @@ from typing import List, Optional, Union from dateutil.relativedelta import relativedelta from deepdiff import DeepDiff from discord import ( - CategoryChannel, Colour, Embed, File, Guild, + Asset, CategoryChannel, Colour, Embed, File, Guild, Member, Message, NotFound, RawMessageDeleteEvent, RawMessageUpdateEvent, Role, TextChannel, User, VoiceChannel ) @@ -73,20 +73,20 @@ class ModLog(Cog, name="ModLog"): self._ignored[event].append(item) async def send_log_message( - self, - icon_url: Optional[str], - colour: Colour, - title: Optional[str], - text: str, - thumbnail: Optional[str] = None, - channel_id: int = Channels.modlog, - ping_everyone: bool = False, - files: Optional[List[File]] = None, - content: Optional[str] = None, - additional_embeds: Optional[List[Embed]] = None, - additional_embeds_msg: Optional[str] = None, - timestamp_override: Optional[datetime] = None, - footer: Optional[str] = None, + self, + icon_url: Optional[str], + colour: Colour, + title: Optional[str], + text: str, + thumbnail: Optional[Union[str, Asset]] = None, + channel_id: int = Channels.modlog, + ping_everyone: bool = False, + files: Optional[List[File]] = None, + content: Optional[str] = None, + additional_embeds: Optional[List[Embed]] = None, + additional_embeds_msg: Optional[str] = None, + timestamp_override: Optional[datetime] = None, + footer: Optional[str] = None, ) -> Context: """Generate log embed and send to logging channel.""" embed = Embed(description=text) |