FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

embeds are not nullable when editing a message by akiraveliara · Pull Request #2474 · DSharpPlus/DSharpPlus · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cs  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class DiscordContainerComponent : DiscordComponent
/// <summary>
/// The accent color for this container, similar to an embed.
/// </summary>
[JsonIgnore]
public DiscordColor? Color
{
get
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ internal class RestChannelMessageEditPayload
[JsonIgnore]
public bool HasContent { get; set; }

[JsonProperty("embeds", NullValueHandling = NullValueHandling.Ignore)]
public IEnumerable<DiscordEmbed>? Embeds { get; set; }
[JsonProperty("embeds")]
public IEnumerable<DiscordEmbed> Embeds { get; set; }

[JsonProperty("allowed_mentions", NullValueHandling = NullValueHandling.Ignore)]
public DiscordMentions? Mentions { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion DSharpPlus/Net/Rest/DiscordRestApiClient.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2521,7 +2521,7 @@ public async ValueTask<DiscordMessage> EditMessageAsync
HasContent = content.HasValue,
Content = content.HasValue ? (string)content : null,
HasEmbed = embeds.HasValue && (embeds.Value?.Any() ?? false),
Embeds = embeds.HasValue && (embeds.Value?.Any() ?? false) ? embeds.Value : null,
Embeds = embeds.HasValue && (embeds.Value?.Any() ?? false) ? embeds.Value : [],
Components = components,
Flags = flags,
Attachments = attachments,
Expand Down
Loading

Back | FazBrowse Home | New Git URL