mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
fix: check if attachments is an array
This commit is contained in:
parent
5a90b7edb4
commit
e8e89e60a8
@ -196,7 +196,7 @@ export class BaseInteraction<
|
||||
poll: poll ? (poll instanceof PollBuilder ? poll.toJSON() : poll) : undefined,
|
||||
};
|
||||
|
||||
if ('attachments' in body) {
|
||||
if (Array.isArray(body.attachments)) {
|
||||
payload.attachments =
|
||||
body.attachments?.map((x, i) => ({
|
||||
id: x.id ?? i.toString(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user