feat(bot,types): add Channel.managed (#2897)

Closes: https://github.com/discordeno/discordeno/issues/2871

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
ITOH
2023-03-29 10:41:05 -05:00
committed by GitHub
co-authored by Skillz4Killz
parent 810f87ff17
commit 6d43ca11a7
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -45,6 +45,7 @@ export function transformChannel(bot: Bot, payload: { channel: DiscordChannel }
lastMessageId: payload.channel.last_message_id ? bot.transformers.snowflake(payload.channel.last_message_id) : undefined,
ownerId: payload.channel.owner_id ? bot.transformers.snowflake(payload.channel.owner_id) : undefined,
applicationId: payload.channel.application_id ? bot.transformers.snowflake(payload.channel.application_id) : undefined,
managed: payload.managed,
parentId: payload.channel.parent_id ? bot.transformers.snowflake(payload.channel.parent_id) : undefined,
memberCount: payload.channel.member_count,
messageCount: payload.channel.message_count,
+2
View File
@@ -703,6 +703,8 @@ export interface DiscordChannel {
owner_id?: string
/** Application id of the group DM creator if it is bot-created */
application_id?: string
/** For group DM channels: whether the channel is managed by an application via the `gdm.join` OAuth2 scope. */
managed?: boolean
/** For guild channels: Id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created */
parent_id?: string | null
/** When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */