|
@@ -84,7 +84,7 @@ namespace Discord.Rest |
|
|
{ |
|
|
{ |
|
|
Content = args.Content, |
|
|
Content = args.Content, |
|
|
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified, |
|
|
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified, |
|
|
Components = args.Components.IsSpecified ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() : Optional<API.ActionRowComponent[]>.Unspecified, |
|
|
|
|
|
|
|
|
Components = args.Components.IsSpecified ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() ?? new API.ActionRowComponent[0] : Optional<API.ActionRowComponent[]>.Unspecified, |
|
|
Flags = args.Flags, |
|
|
Flags = args.Flags, |
|
|
AllowedMentions = args.AllowedMentions.IsSpecified ? args.AllowedMentions.Value.ToModel() : Optional<API.AllowedMentions>.Unspecified, |
|
|
AllowedMentions = args.AllowedMentions.IsSpecified ? args.AllowedMentions.Value.ToModel() : Optional<API.AllowedMentions>.Unspecified, |
|
|
}; |
|
|
}; |
|
@@ -150,7 +150,7 @@ namespace Discord.Rest |
|
|
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified, |
|
|
Embeds = apiEmbeds?.ToArray() ?? Optional<API.Embed[]>.Unspecified, |
|
|
Flags = args.Flags.IsSpecified ? args.Flags.Value : Optional.Create<MessageFlags?>(), |
|
|
Flags = args.Flags.IsSpecified ? args.Flags.Value : Optional.Create<MessageFlags?>(), |
|
|
AllowedMentions = args.AllowedMentions.IsSpecified ? args.AllowedMentions.Value.ToModel() : Optional.Create<API.AllowedMentions>(), |
|
|
AllowedMentions = args.AllowedMentions.IsSpecified ? args.AllowedMentions.Value.ToModel() : Optional.Create<API.AllowedMentions>(), |
|
|
Components = args.Components.IsSpecified ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() : Optional<API.ActionRowComponent[]>.Unspecified, |
|
|
|
|
|
|
|
|
Components = args.Components.IsSpecified ? args.Components.Value?.Components.Select(x => new API.ActionRowComponent(x)).ToArray() ?? new API.ActionRowComponent[0] : Optional<API.ActionRowComponent[]>.Unspecified, |
|
|
}; |
|
|
}; |
|
|
return await client.ApiClient.ModifyMessageAsync(channelId, msgId, apiArgs, options).ConfigureAwait(false); |
|
|
return await client.ApiClient.ModifyMessageAsync(channelId, msgId, apiArgs, options).ConfigureAwait(false); |
|
|
} |
|
|
} |
|
|