(ifcbrk) fix: Add AllowedMentions to SendFileAsync (#1531)

* Add AllowedMentions to SendFileAsync

* Update xml reference and mocked channels
This commit is contained in:
Paulo
2020-06-18 00:51:50 -03:00
committed by GitHub
parent f2130f8513
commit ab32607bcc
15 changed files with 117 additions and 69 deletions

View File

@@ -19,6 +19,7 @@ namespace Discord.API.Rest
public Optional<string> Nonce { get; set; }
public Optional<bool> IsTTS { get; set; }
public Optional<Embed> Embed { get; set; }
public Optional<AllowedMentions> AllowedMentions { get; set; }
public bool IsSpoiler { get; set; } = false;
public UploadFileParams(Stream file)
@@ -43,6 +44,8 @@ namespace Discord.API.Rest
payload["nonce"] = Nonce.Value;
if (Embed.IsSpecified)
payload["embed"] = Embed.Value;
if (AllowedMentions.IsSpecified)
payload["allowed_mentions"] = AllowedMentions.Value;
if (IsSpoiler)
payload["hasSpoiler"] = IsSpoiler.ToString();