mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): add poll proxying
This commit is contained in:
parent
b72805c51c
commit
9699490674
4 changed files with 55 additions and 2 deletions
|
|
@ -13,4 +13,14 @@ public record ExecuteWebhookRequest
|
|||
public AllowedMentions? AllowedMentions { get; init; }
|
||||
public bool? Tts { get; init; }
|
||||
public Message.MessageFlags? Flags { get; set; }
|
||||
public WebhookPoll? Poll { get; set; }
|
||||
|
||||
public record WebhookPoll
|
||||
{
|
||||
public Message.PollMedia Question { get; init; }
|
||||
public Message.PollAnswer[] Answers { get; init; }
|
||||
public int? Duration { get; init; }
|
||||
public bool AllowMultiselect { get; init; }
|
||||
public int LayoutType { get; init; }
|
||||
}
|
||||
}
|
||||
|
|
@ -70,6 +70,8 @@ public record Message
|
|||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public Optional<Message?> ReferencedMessage { get; init; }
|
||||
|
||||
public MessagePoll? Poll { get; init; }
|
||||
|
||||
// public MessageComponent[]? Components { get; init; }
|
||||
|
||||
public record Reference(ulong? GuildId, ulong? ChannelId, ulong? MessageId);
|
||||
|
|
@ -96,4 +98,17 @@ public record Message
|
|||
public bool Me { get; init; }
|
||||
public Emoji Emoji { get; init; }
|
||||
}
|
||||
|
||||
public record PollMedia(string? Text, Emoji? Emoji);
|
||||
|
||||
public record PollAnswer(PollMedia PollMedia);
|
||||
|
||||
public record MessagePoll
|
||||
{
|
||||
public PollMedia Question { get; init; }
|
||||
public PollAnswer[] Answers { get; init; }
|
||||
public string? Expiry { get; init; }
|
||||
public bool AllowMultiselect { get; init; }
|
||||
public int LayoutType { get; init; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue