mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fix Case's modified_at attr and its format in message content (#5317)
* Fix modified_at field to properly format. * let's just fix the type hints Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
eeed082542
commit
89e3a78ead
@ -283,7 +283,7 @@ class Case:
|
|||||||
.. note::
|
.. note::
|
||||||
This attribute will be of type `int`
|
This attribute will be of type `int`
|
||||||
if the Discord user can no longer be found.
|
if the Discord user can no longer be found.
|
||||||
modified_at: Optional[int]
|
modified_at: Optional[float]
|
||||||
The UNIX time of the last change to the case.
|
The UNIX time of the last change to the case.
|
||||||
`None` if the case was never edited.
|
`None` if the case was never edited.
|
||||||
message: Optional[discord.Message]
|
message: Optional[discord.Message]
|
||||||
@ -310,7 +310,7 @@ class Case:
|
|||||||
until: Optional[int] = None,
|
until: Optional[int] = None,
|
||||||
channel: Optional[Union[discord.abc.GuildChannel, int]] = None,
|
channel: Optional[Union[discord.abc.GuildChannel, int]] = None,
|
||||||
amended_by: Optional[Union[discord.Object, discord.abc.User, int]] = None,
|
amended_by: Optional[Union[discord.Object, discord.abc.User, int]] = None,
|
||||||
modified_at: Optional[int] = None,
|
modified_at: Optional[float] = None,
|
||||||
message: Optional[discord.Message] = None,
|
message: Optional[discord.Message] = None,
|
||||||
last_known_username: Optional[str] = None,
|
last_known_username: Optional[str] = None,
|
||||||
):
|
):
|
||||||
@ -454,7 +454,7 @@ class Case:
|
|||||||
|
|
||||||
last_modified = None
|
last_modified = None
|
||||||
if self.modified_at:
|
if self.modified_at:
|
||||||
last_modified = f"<t:{self.modified_at}>"
|
last_modified = f"<t:{int(self.modified_at)}>"
|
||||||
|
|
||||||
if isinstance(self.user, int):
|
if isinstance(self.user, int):
|
||||||
if self.user == 0xDE1:
|
if self.user == 0xDE1:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user