Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Implement ThreadChannel.ownerId
Browse files Browse the repository at this point in the history
  • Loading branch information
Defxult committed Oct 21, 2023
1 parent 78ad316 commit 345272d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Discord/Models/Channel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,9 @@ public class ThreadChannel : GuildChannelMessageable, Hashable {
/// Permission overwrites for the channel. Will always be empty for a thread channel.
public let overwrites = [PermissionOverwrites]()

/// The ID of the user that started the thread.
public let ownerId: Snowflake

/// The ID of the last message sent in the thread.
public internal(set) var lastMessageId: Snowflake?

Expand Down Expand Up @@ -1581,6 +1584,7 @@ public class ThreadChannel : GuildChannelMessageable, Hashable {
slowmode = threadData["rate_limit_per_user"] as! Int
memberCount = threadData["member_count"] as! Int
messageCount = threadData["message_count"] as! Int
ownerId = Conversions.snowflakeToUInt(threadData["owner_id"])

if let tagIdStrs = threadData["applied_tags"] as? [String] {
var tagIds = [Snowflake]()
Expand Down

0 comments on commit 345272d

Please sign in to comment.