fix: find the user instead of creating it when replying to a message

This commit is contained in:
CyberL1
2026-01-31 22:47:31 +01:00
parent a66d6f0086
commit fd4dd5499e
+2 -3
View File
@@ -346,9 +346,8 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
});
if (referencedMessage && referencedMessage.author_id !== message.author_id) {
message.mentions.push(
User.create({
id: referencedMessage.author_id,
}),
// @ts-expect-error it does not like the .toPublicUser() lol
(await User.findOne({ where: { id: referencedMessage.author_id } }))!.toPublicUser(),
);
}