feat(bot): add poll proxying

This commit is contained in:
ambdroid 2024-10-01 08:38:35 -04:00 committed by GitHub
parent b72805c51c
commit 9699490674
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 2 deletions

View file

@ -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; }
}
}

View file

@ -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; }
}
}