From 508bf523bb4d00e9dc82075fea06d53e0ce9ad5b Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Mon, 16 Dec 2024 12:02:51 +0100 Subject: [PATCH] chore: add missing field Resolves DISCATSHARP-2EP Resolves DISCATSHARP-2EN --- DisCatSharp/Entities/Message/DiscordMessage.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/DisCatSharp/Entities/Message/DiscordMessage.cs b/DisCatSharp/Entities/Message/DiscordMessage.cs index cacead336b..d8a4f59c4d 100644 --- a/DisCatSharp/Entities/Message/DiscordMessage.cs +++ b/DisCatSharp/Entities/Message/DiscordMessage.cs @@ -153,6 +153,7 @@ internal DiscordMessage(DiscordMessage other) this.Poll.ChannelId = this.ChannelId; this.Poll.MessageId = this.Id; + this.ChannelType = other.ChannelType; } /// @@ -165,6 +166,12 @@ public DiscordChannel Channel internal set => this._channel = value; } + /// + /// Gets the type of the this message was send in. + /// + [JsonProperty("channel_type", NullValueHandling = NullValueHandling.Ignore)] + public ChannelType ChannelType { get; internal set; } + /// /// Gets the thread in which the message was sent. /// @@ -502,7 +509,10 @@ public async Task EndPollAsync() /// /// The channel to forward this message to. /// Content is not available at the moment, but already added for the future. - /// Thrown when the bot tries forwarding a message it doesn't has access to or the client tried to modify a message not sent by them. + /// + /// Thrown when the bot tries forwarding a message it doesn't has access to or the + /// client tried to modify a message not sent by them. + /// /// Thrown when the target channel does not exist. /// Thrown when an invalid parameter was provided. /// Thrown when Discord is unable to process the request.