mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat: add support for attachment descriptions
This commit is contained in:
parent
36acb5bae6
commit
0ca356eec3
7 changed files with 25 additions and 7 deletions
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -71,6 +71,7 @@ namespace Myriad.Types
|
|||
public record Attachment
|
||||
{
|
||||
public ulong Id { get; init; }
|
||||
public string? Description { get; init; }
|
||||
public string Filename { get; init; }
|
||||
public int Size { get; init; }
|
||||
public string Url { get; init; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue