Skip to content

Commit

Permalink
fix to-external file bridging
Browse files Browse the repository at this point in the history
  • Loading branch information
greeeen-dev committed Sep 27, 2024
1 parent c983206 commit df1b5ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/platform_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# can be handled gracefully by the bot.

import nextcord
from typing import Union

class MissingImplementation(Exception):
"""An exception used when something isn't implemented.
Expand Down Expand Up @@ -198,8 +199,8 @@ async def to_discord_file(self, file):
"""Converts an attachment object to a nextcord.File object."""
raise MissingImplementation()

async def to_platform_file(self, file: nextcord.Attachment):
"""Converts a nextcord.Attachment object to the platform's file object."""
async def to_platform_file(self, file: Union[nextcord.Attachment, nextcord.File]):
"""Converts a nextcord.Attachment or nextcord.File object to the platform's file object."""
raise MissingImplementation()

async def send(self, channel, content, special: dict = None):
Expand Down

0 comments on commit df1b5ce

Please sign in to comment.