Skip to content

Commit

Permalink
Issue #1126 fix data initialization error
Browse files Browse the repository at this point in the history
  • Loading branch information
Elizabeth Cray committed Apr 4, 2024
1 parent 20241ad commit 1cafa02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/managers/GuildForumThreadManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,23 @@ class GuildForumThreadManager extends ThreadManager {
});
const attachmentsData = await Promise.all(requestPromises);
attachmentsData.sort((a, b) => parseInt(a.id) - parseInt(b.id));
data.attachments = attachmentsData;

if (autoArchiveDuration === 'MAX') autoArchiveDuration = resolveAutoArchiveMaxLimit(this.channel.guild);

const data = await this.client.api.channels(this.channel.id).threads.post({
const post_data = await this.client.api.channels(this.channel.id).threads.post({
data: {
name,
auto_archive_duration: autoArchiveDuration,
rate_limit_per_user: rateLimitPerUser,
applied_tags: appliedTags,
message: body,
attachments: attachmentsData,
},
files: [],
reason,
});

return this.client.actions.ThreadCreate.handle(data).thread;
return this.client.actions.ThreadCreate.handle(post_data).thread;
}
}

Expand Down

0 comments on commit 1cafa02

Please sign in to comment.