Add default_auto_archive_duration to createChannel helper options (#2202)

* Add default_auto_archive_duration to createChannel helper options

* Update helpers/channels/createChannel.ts

Co-authored-by: ITOH <to@itoh.at>

Co-authored-by: ITOH <to@itoh.at>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
LTS20050703
2022-05-13 00:53:51 +07:00
committed by GitHub
parent 8807310b85
commit d4e109a48e

View File

@@ -30,6 +30,7 @@ export async function createChannel(bot: Bot, guildId: bigint, options?: CreateG
})),
type: options?.type || ChannelTypes.GuildText,
reason,
default_auto_archive_duration: options?.defaultAutoArchiveDuration,
}
: {},
);
@@ -58,4 +59,6 @@ export interface CreateGuildChannel {
parentId?: bigint;
/** Whether the channel is nsfw */
nsfw?: boolean;
/** Default duration (in minutes) that clients (not the API) use for newly created threads in this channel, to determine when to automatically archive the thread after the last activity */
defaultAutoArchiveDuration?: number;
}