fix: add expiry field to polls in message handling

This commit is contained in:
CyberL1
2026-06-25 17:56:49 +02:00
committed by Rory&
parent 374e2a8ad6
commit 77124c559b
+4
View File
@@ -486,6 +486,10 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
message.content = opts.content?.trim();
if (message.poll && opts.poll?.duration) {
message.poll.expiry = new Date(Date.now() + opts.poll.duration * 3600000);
}
await handleMessageMentionsAsync(message);
const attachmentIndices = new Map(message.attachments?.map((attachment, index) => [`attachment://${attachment.filename}`, index]));