blob: 630ef47e4ab40f94306c7505c1fab9f046f9d9e4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
using System.Text.Json.Serialization;
namespace Spacebar.Interop.Replication.Abstractions;
public class ContentlessReplicationMessage {
[JsonPropertyName("channel_id")]
public string? ChannelId { get; set; }
[JsonPropertyName("guild_id")]
public string? GuildId { get; set; }
[JsonPropertyName("user_id")]
public string? UserId { get; set; }
[JsonPropertyName("session_id")]
public string? SessionId { get; set; }
[JsonPropertyName("created_at")]
public DateTime? CreatedAt { get; set; }
[JsonPropertyName("event")]
public string Event { get; set; } = null!;
[JsonPropertyName("origin")]
public string? Origin { get; set; }
[JsonPropertyName("reconnect_delay")]
public int? ReconnectDelay { get; set; }
}
public class ReplicationMessage<TPayload> : ContentlessReplicationMessage {
[JsonPropertyName("data")]
public TPayload Payload { get; set; } = default!;
}
|