feat: add support for attachment descriptions
This commit is contained in:
@@ -154,8 +154,8 @@ namespace Myriad.Rest
|
||||
{
|
||||
for (var i = 0; i < files.Length; i++)
|
||||
{
|
||||
var (filename, stream) = files[i];
|
||||
mfd.Add(new StreamContent(stream), $"file{i}", filename);
|
||||
var (filename, stream, _) = files[i];
|
||||
mfd.Add(new StreamContent(stream), $"files[{i}]", filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,5 +2,5 @@ using System.IO;
|
||||
|
||||
namespace Myriad.Rest.Types
|
||||
{
|
||||
public record MultipartFile(string Filename, Stream Data);
|
||||
public record MultipartFile(string Filename, Stream Data, string? Description);
|
||||
}
|
@@ -8,6 +8,7 @@ namespace Myriad.Rest.Types.Requests
|
||||
public string? Username { get; init; }
|
||||
public string? AvatarUrl { get; init; }
|
||||
public Embed[] Embeds { get; init; }
|
||||
public Message.Attachment[] Attachments { get; set; }
|
||||
public AllowedMentions? AllowedMentions { get; init; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user