Skip to content

Commit 6412651

Browse files
committed
refactor: use d.py utils.format_dt
1 parent 392b7be commit 6412651

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

quotes/quotes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async def make_quote_embed(
158158
.add_field(name="Submitted by", value=ctx.author.mention)
159159
.add_field(name="Channels", value="\n".join(unique_channels))
160160
.add_field(name="Link", value=f"[Jump to quote]({messages[0].jump_url})")
161-
.add_field(name="Timestamp", value=f"<t:{int(messages[0].created_at.timestamp())}:F>")
161+
.add_field(name="Timestamp", value=discord.utils.format_dt(messages[0].created_at, "F"))
162162
)
163163

164164
async def send_error(self, ctx, error_type: str = "", custom_msg: str = "") -> None:

report/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ async def make_report_embed(
353353
)
354354
.set_author(name="Report", icon_url=message.author.display_avatar.url)
355355
.add_field(name="Reporter", value=message.author.mention)
356-
.add_field(name="Timestamp", value=f"<t:{int(message.created_at.timestamp())}:F>")
356+
.add_field(name="Timestamp", value=discord.utils.format_dt(message.created_at, "F"))
357357
)
358358

359359
if isinstance(channel, TextLikeChannel):

roleinfo/roleinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ async def make_role_embed(self, role: discord.Role) -> discord.Embed:
4242
.add_field(name="Mentionable", value="Yes" if role.mentionable else "No")
4343
.add_field(name="Position", value=len(role.guild.roles) - role.position)
4444
.add_field(name="ID", value=role.id)
45-
.add_field(name="Created at", value=f"<t:{int(role.created_at.timestamp())}:F>")
45+
.add_field(name="Created at", value=discord.utils.format_dt(role.created_at, "F"))
4646
)

0 commit comments

Comments
 (0)