feat(aurora): imma be real chief i have no idea what i did this commit
This commit is contained in:
parent
a641b11daa
commit
af108519f9
4 changed files with 40 additions and 20 deletions
|
@ -2,12 +2,16 @@
|
|||
from datetime import datetime, timedelta
|
||||
from typing import Union
|
||||
|
||||
from discord import Color, Embed, Guild, Interaction, InteractionMessage, Member, Role, User
|
||||
from discord import (Color, Embed, Guild, Interaction, InteractionMessage,
|
||||
Member, Role, User)
|
||||
from redbot.core import commands
|
||||
from redbot.core.utils.chat_formatting import bold, box, error, humanize_timedelta, warning
|
||||
from redbot.core.utils.chat_formatting import (bold, box, error,
|
||||
humanize_timedelta, warning)
|
||||
|
||||
from aurora.utilities.config import config
|
||||
from aurora.utilities.utils import fetch_channel_dict, fetch_user_dict, get_bool_emoji, get_next_case_number, get_pagesize_str
|
||||
from aurora.utilities.utils import (fetch_channel_dict, fetch_user_dict,
|
||||
get_bool_emoji, get_next_case_number,
|
||||
get_pagesize_str)
|
||||
|
||||
|
||||
async def message_factory(
|
||||
|
@ -87,7 +91,7 @@ async def message_factory(
|
|||
|
||||
embed.set_footer(
|
||||
text=f"Case #{await get_next_case_number(guild.id):,}",
|
||||
icon_url="https://cdn.discordapp.com/attachments/1070822161389994054/1159469476773904414/arrow-right-circle-icon-512x512-2p1e2aaw.png?ex=65312319&is=651eae19&hm=3cebdd28e805c13a79ec48ef87c32ca532ffa6b9ede2e48d0cf8e5e81f3a6818&",
|
||||
icon_url="attachment://arrow.png",
|
||||
)
|
||||
|
||||
return embed
|
||||
|
|
|
@ -5,9 +5,9 @@ from datetime import timedelta as td
|
|||
from typing import Optional, Union
|
||||
|
||||
from dateutil.relativedelta import relativedelta as rd
|
||||
from discord import Guild, Interaction, Member, SelectOption, User
|
||||
from discord import File, Guild, Interaction, Member, SelectOption, User
|
||||
from discord.errors import Forbidden, NotFound
|
||||
from redbot.core import commands
|
||||
from redbot.core import commands, data_manager
|
||||
from redbot.core.utils.chat_formatting import error
|
||||
|
||||
from .config import config
|
||||
|
@ -291,3 +291,8 @@ def timedelta_from_relativedelta(relativedelta: rd) -> td:
|
|||
now = datetime.now()
|
||||
then = now - relativedelta
|
||||
return now - then
|
||||
|
||||
def get_footer_image(coginstance: commands.Cog) -> File:
|
||||
"""Returns the footer image for the embeds."""
|
||||
image_path = data_manager.bundled_data_path(coginstance) / "arrow.png"
|
||||
return File(image_path, filename="arrow.png", description="arrow")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue