import discord from helpers import IMAGES, PD_SEASON, SBA_COLOR def image_embed(image_url: str, title: str = None, color: str = None, desc: str = None, author_name: str = None, author_icon: str = None, thumbnail_url: str = None): embed_color = int(SBA_COLOR, 16) if color is not None: embed_color = int(color, 16) embed = discord.Embed(color=embed_color) if title is not None: embed.title = title if desc is not None: embed.description = desc if author_name is not None: icon = author_icon if author_icon is not None else IMAGES['logo'] embed.set_author(name=author_name, icon_url=icon) if thumbnail_url is not None: embed.set_thumbnail(url=thumbnail_url) embed.set_footer(text=f'Paper Dynasty Season {PD_SEASON}', icon_url=IMAGES['logo']) embed.set_image(url=image_url) return embed