Applying previous commit.
This commit is contained in:
parent
a3ca41255a
commit
4f4a8133a6
@ -137,8 +137,9 @@ class LoggingCog(commands.Cog):
|
||||
ui.Separator(spacing=discord.SeparatorSpacing.small)
|
||||
)
|
||||
|
||||
# Avoid nested containers as webhook messages don't support them
|
||||
self.content_container = self.container
|
||||
# Place main log content between separators
|
||||
self.content_container = ui.Container()
|
||||
self.container.add_item(self.content_container)
|
||||
self.container.add_item(
|
||||
ui.Separator(spacing=discord.SeparatorSpacing.small)
|
||||
)
|
||||
@ -177,10 +178,9 @@ class LoggingCog(commands.Cog):
|
||||
|
||||
def set_footer(self, text: str) -> None:
|
||||
"""Replace the footer text while preserving the timestamp."""
|
||||
timestamp = discord.utils.format_dt(
|
||||
datetime.datetime.utcnow(), style="f"
|
||||
)
|
||||
timestamp = discord.utils.format_dt(datetime.datetime.utcnow(), style="f")
|
||||
self.footer_display.content = f"{timestamp} | {text}"
|
||||
|
||||
def _user_display(self, user: Union[discord.Member, discord.User]) -> str:
|
||||
"""Return display name, username and ID string for a user."""
|
||||
display = user.display_name if isinstance(user, discord.Member) else user.name
|
||||
|
Loading…
x
Reference in New Issue
Block a user