forked from wabbajack-tools/wabbajack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DTOs.cs
80 lines (54 loc) · 2.04 KB
/
DTOs.cs
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Text.Json.Serialization;
namespace Wabbajack.Networking.Discord;
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum Channel
{
Spam,
Ham
}
public class DiscordMessage
{
[JsonPropertyName("username")] public string UserName { get; set; }
[JsonPropertyName("avatar_url")] public Uri AvatarUrl { get; set; }
[JsonPropertyName("content")] public string Content { get; set; }
[JsonPropertyName("embeds")] public DiscordEmbed[] Embeds { get; set; }
}
public class DiscordEmbed
{
[JsonPropertyName("title")] public string Title { get; set; }
[JsonPropertyName("color")] public int Color { get; set; }
[JsonPropertyName("author")] public DiscordAuthor Author { get; set; }
[JsonPropertyName("url")] public Uri Url { get; set; }
[JsonPropertyName("description")] public string Description { get; set; }
[JsonPropertyName("fields")] public DiscordField Field { get; set; }
[JsonPropertyName("thumbnail")] public DiscordNumbnail Thumbnail { get; set; }
[JsonPropertyName("image")] public DiscordImage Image { get; set; }
[JsonPropertyName("footer")] public DiscordFooter Footer { get; set; }
[JsonPropertyName("timestamp")] public DateTime Timestamp { get; set; } = DateTime.UtcNow;
}
public class DiscordAuthor
{
[JsonPropertyName("name")] public string Name { get; set; }
[JsonPropertyName("url")] public Uri Url { get; set; }
[JsonPropertyName("icon_url")] public Uri IconUrl { get; set; }
}
public class DiscordField
{
[JsonPropertyName("name")] public string Name { get; set; }
[JsonPropertyName("value")] public string Value { get; set; }
[JsonPropertyName("inline")] public bool Inline { get; set; }
}
public class DiscordNumbnail
{
[JsonPropertyName("Url")] public Uri Url { get; set; }
}
public class DiscordImage
{
[JsonPropertyName("Url")] public Uri Url { get; set; }
}
public class DiscordFooter
{
[JsonPropertyName("text")] public string Text { get; set; }
[JsonPropertyName("icon_url")] public Uri icon_url { get; set; }
}