From ecc036e542965e0a91c7c2885c2a8b96bbbbd061 Mon Sep 17 00:00:00 2001 From: Marie Date: Fri, 17 Sep 2021 23:18:24 +0200 Subject: [PATCH] add nsfw mappings --- src/maps/Channels.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/maps/Channels.ts b/src/maps/Channels.ts index 300d5153..13e8296c 100644 --- a/src/maps/Channels.ts +++ b/src/maps/Channels.ts @@ -90,6 +90,12 @@ export class Channel { * Users typing in channel. */ typing_ids: Set = new Set(); + + /** + * Channel is not safe for work. + * @requires `Group`, `TextChannel`, `VoiceChannel` + */ + nsfw: Nullable = null; /** * The group owner. @@ -167,6 +173,7 @@ export class Channel { this.last_message_id = toNullable(data.last_message_id); this.icon = toNullable(data.icon); this.permissions = toNullable(data.permissions); + this.nsfw = toNullable(data.nsfw); break; } case "TextChannel": @@ -180,6 +187,7 @@ export class Channel { if (data.channel_type === "TextChannel") { this.last_message_id = toNullable(data.last_message_id); + this.nsfw = toNullable(data.nsfw); } break; @@ -224,6 +232,7 @@ export class Channel { apply("description"); apply("recipients", "recipient_ids"); apply("last_message_id"); + apply("nsfw"); } @action updateGroupJoin(user: string) {