feat: ForumChannel

Backport https://github.com/discordjs/discord.js/pull/8786
This commit is contained in:
March 7th
2022-10-26 19:21:40 +07:00
parent db696d3e16
commit f8246be0aa
2 changed files with 32 additions and 20 deletions

View File

@@ -55,8 +55,6 @@ class GuildForumThreadManager extends ThreadManager {
rateLimitPerUser,
appliedTags,
} = {}) {
let path = this.client.api.channels(this.channel.id);
if (!message) {
throw new TypeError('GUILD_FORUM_MESSAGE_REQUIRED');
}
@@ -73,7 +71,7 @@ class GuildForumThreadManager extends ThreadManager {
if (autoArchiveDuration === 'MAX') autoArchiveDuration = resolveAutoArchiveMaxLimit(this.channel.guild);
const data = await path.threads.post({
const data = await this.client.api.channels(this.channel.id).threads.post({
data: {
name,
auto_archive_duration: autoArchiveDuration,