feat: import messages from go version

This commit is contained in:
sam 2024-10-28 23:42:57 +01:00
parent b56a71e105
commit a50a8567dd
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
15 changed files with 503 additions and 769 deletions

View file

@ -14,6 +14,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
using NodaTime;
using Remora.Discord.API.Objects;
using J = System.Text.Json.Serialization.JsonPropertyNameAttribute;
// ReSharper disable NotAccessedPositionalProperty.Global
@ -45,3 +46,22 @@ public record GuildsExport(
List<GoInvite> Invites,
List<GoWatchlistEntry> Watchlist
);
public record GoMessage(
[property: J("MsgID")] ulong Id,
[property: J("UserID")] ulong UserId,
[property: J("ChannelID")] ulong ChannelId,
[property: J("ServerID")] ulong GuildId,
string Content,
string Username,
string? Member,
string? System,
GoMetadata? Metadata
);
public record GoMetadata(
[property: J("UserID")] ulong? UserId,
string? Username,
string? Avatar,
EmbedField[]? Embeds
);