Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions models/database/quoteData.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ async def create_embed(
)
embed.set_footer(
text=
f"von @{self.reporter.display_name} ({self.reporter.global_name})"
f"von {self.reporter.mention} ({self.reporter.global_name})"
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mention attribute does not exist on the database User model. The self.reporter is a Tortoise ORM User instance (defined in models/database/userData.py) which only has id, global_name, and display_name fields. To create a Discord mention, you need to manually format it as f"<@{self.reporter.id}>".

Copilot uses AI. Check for mistakes.
)

for msg in self.messages:
content = msg.content[:1024] if msg.content else "[- kein Text -]"
embed.add_field(
name=f"~ {msg.author.display_name}",
name=f"~ {msg.author.mention}",
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mention attribute does not exist on the database User model. The msg.author is a Tortoise ORM User instance (defined in models/database/userData.py) which only has id, global_name, and display_name fields. To create a Discord mention, you need to manually format it as f"<@{msg.author.id}>".

Copilot uses AI. Check for mistakes.
value=f"“{content}”",
inline=False
)
Expand Down
2 changes: 1 addition & 1 deletion utils/quoteUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def build_quote_embed(
for msg in messages:
content = msg.content[:1024] if msg.content else "[- kein Text -]"
embed.add_field(
name=f"~ {msg.author.display_name}",
name=f"~ {msg.author.mention}",
value=f'"{content}"\n[Originalnachricht]({msg.jump_url})',
inline=False
)
Expand Down
Loading