|
|
|
@ -16,7 +16,7 @@ from miyu_bot.commands.common.emoji import attribute_emoji_ids_by_attribute_id, |
|
|
|
|
event_point_emoji_id |
|
|
|
|
from miyu_bot.commands.common.formatting import format_info |
|
|
|
|
from miyu_bot.commands.common.fuzzy_matching import romanize |
|
|
|
|
from miyu_bot.commands.common.master_asset_manager import MasterFilter |
|
|
|
|
from miyu_bot.commands.common.master_asset_manager import MasterFilter, hash_master |
|
|
|
|
from miyu_bot.commands.common.reaction_message import run_paged_message |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -53,14 +53,11 @@ class Event(commands.Cog): |
|
|
|
|
return |
|
|
|
|
self.logger.info(f'Found event "{event}" ({romanize(event.name)}).') |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
logo = discord.File(event.logo_path, filename='logo.png') |
|
|
|
|
except FileNotFoundError: |
|
|
|
|
# Just a fallback |
|
|
|
|
logo = discord.File(asset_manager.path / 'ondemand/stamp/stamp_10006.png', filename='logo.png') |
|
|
|
|
|
|
|
|
|
embed = discord.Embed(title=event.name) |
|
|
|
|
embed.set_thumbnail(url=f'attachment://logo.png') |
|
|
|
|
|
|
|
|
|
event_hash = hash_master(event) |
|
|
|
|
event_logo_path = event.logo_path |
|
|
|
|
embed.set_thumbnail(url=f'https://qwewqa.github.io/d4dj-dumps/events/logos/{event_logo_path.stem}_{event_hash}{event_logo_path.suffix}') |
|
|
|
|
|
|
|
|
|
duration_hour_part = round((event.duration.seconds / 3600), 2) |
|
|
|
|
duration_hour_part = duration_hour_part if not duration_hour_part.is_integer() else int(duration_hour_part) |
|
|
|
@ -109,7 +106,7 @@ class Event(commands.Cog): |
|
|
|
|
inline=True) |
|
|
|
|
embed.set_footer(text=f'Event Id: {event.id}') |
|
|
|
|
|
|
|
|
|
await ctx.send(files=[logo], embed=embed) |
|
|
|
|
await ctx.send(embed=embed) |
|
|
|
|
|
|
|
|
|
@commands.command(name='time', |
|
|
|
|
aliases=[], |
|
|
|
|