Skip to content

Commit

Permalink
chore: add missing field
Browse files Browse the repository at this point in the history
Resolves DISCATSHARP-2EP
Resolves DISCATSHARP-2EN
  • Loading branch information
Lulalaby committed Dec 16, 2024
1 parent d1c30a2 commit 508bf52
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion DisCatSharp/Entities/Message/DiscordMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ internal DiscordMessage(DiscordMessage other)

this.Poll.ChannelId = this.ChannelId;
this.Poll.MessageId = this.Id;
this.ChannelType = other.ChannelType;
}

/// <summary>
Expand All @@ -165,6 +166,12 @@ public DiscordChannel Channel
internal set => this._channel = value;
}

/// <summary>
/// Gets the type of the <see cref="Channel" /> this message was send in.
/// </summary>
[JsonProperty("channel_type", NullValueHandling = NullValueHandling.Ignore)]
public ChannelType ChannelType { get; internal set; }

/// <summary>
/// Gets the thread in which the message was sent.
/// </summary>
Expand Down Expand Up @@ -502,7 +509,10 @@ public async Task<DiscordMessage> EndPollAsync()
/// </summary>
/// <param name="targetChannel">The channel to forward this message to.</param>
/// <param name="content">Content is not available at the moment, but already added for the future.</param>
/// <exception cref="UnauthorizedException">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.</exception>
/// <exception cref="UnauthorizedException">
/// 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.
/// </exception>
/// <exception cref="NotFoundException">Thrown when the target channel does not exist.</exception>
/// <exception cref="BadRequestException">Thrown when an invalid parameter was provided.</exception>
/// <exception cref="ServerErrorException">Thrown when Discord is unable to process the request.</exception>
Expand Down

0 comments on commit 508bf52

Please sign in to comment.