-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathMessageModel.cs
More file actions
211 lines (190 loc) · 6.42 KB
/
Copy pathMessageModel.cs
File metadata and controls
211 lines (190 loc) · 6.42 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
using System;
namespace DiscordUnity.Models
{
internal class MessageModel
{
public string Id { get; set; }
public string ChannelId { get; set; }
public string GuildId { get; set; }
public UserModel Author { get; set; }
public GuildMemberModel Member { get; set; }
public string Content { get; set; }
public DateTime Timestamp { get; set; }
public DateTime? EditedTimestamp { get; set; }
public bool Tts { get; set; }
public bool MentionEveryone { get; set; }
public UserModel[] Mentions { get; set; }
public RoleModel[] MentionRoles { get; set; }
public ChannelMentionModel[] MentionChannels { get; set; }
public AttachmentModel[] Attachments { get; set; }
public EmbedModel[] Embeds { get; set; }
public ReactionModel[] Reactions { get; set; }
public object Nonce { get; set; }
public bool Pinned { get; set; }
public string WebhookId { get; set; }
public MessageType Type { get; set; }
public MessageActivityModel Activity { get; set; }
public MessageApplicationModel Application { get; set; }
public MessageReferenceModel MessageReference { get; set; }
public MessageFlags Flags { get; set; }
}
internal class ChannelMentionModel
{
public string Id { get; set; }
public string GuildId { get; set; }
public ChannelType Type { get; set; }
public string Name { get; set; }
}
internal class AttachmentModel
{
public string Id { get; set; }
public string Filename { get; set; }
public int Size { get; set; }
public string Url { get; set; }
public string ProxyUrl { get; set; }
public int? Height { get; set; }
public int? Width { get; set; }
}
internal class EmbedModel
{
public string Title { get; set; }
public EmbedType Type { get; set; }
public string Description { get; set; }
public string Url { get; set; }
public DateTime? Timestamp { get; set; }
public int Color { get; set; }
public EmbedFooterModel Footer { get; set; }
public EmbedImageModel Image { get; set; }
public EmbedThumbnailModel Thumbnail { get; set; }
public EmbedVideoModel Video { get; set; }
public EmbedProviderModel Provider { get; set; }
public EmbedAuthorModel Author { get; set; }
public EmbedFieldModel[] Fields { get; set; }
}
public enum EmbedType
{
Rich,
Image,
Video,
Gifv,
Article,
Link
}
internal class EmbedFooterModel
{
public string Text { get; set; }
public string IconUrl { get; set; }
public string ProxyIconUrl { get; set; }
}
internal class EmbedImageModel
{
public string Url { get; set; }
public string proxyUrl { get; set; }
public int? Height { get; set; }
public int? Width { get; set; }
}
internal class EmbedThumbnailModel
{
public string Url { get; set; }
public string proxyUrl { get; set; }
public int? Height { get; set; }
public int? Width { get; set; }
}
internal class EmbedVideoModel
{
public string Url { get; set; }
public int? Height { get; set; }
public int? Width { get; set; }
}
internal class EmbedProviderModel
{
public string Name { get; set; }
public string Url { get; set; }
}
internal class EmbedAuthorModel
{
public string Name { get; set; }
public string Url { get; set; }
public string IconUrl { get; set; }
public string ProxyIconUrl { get; set; }
}
internal class EmbedFieldModel
{
public string Name { get; set; }
public string Value { get; set; }
public bool? Inline { get; set; }
}
internal class ReactionModel
{
public int Count { get; set; }
public bool Me { get; set; }
public EmojiModel Emoji { get; set; }
}
internal class MessageReactionModel
{
public string UserId { get; set; }
public string ChannelId { get; set; }
public string MessageId { get; set; }
public string GuildId { get; set; }
public GuildMemberModel Member { get; set; }
public EmojiModel Emoji { get; set; }
}
public enum MessageType
{
DEFAULT = 0,
RECIPIENT_ADD = 1,
RECIPIENT_REMOVE = 2,
CALL = 3,
CHANNEL_NAME_CHANGE = 4,
CHANNEL_ICON_CHANGE = 5,
CHANNEL_PINNED_MESSAGE = 6,
GUILD_MEMBER_JOIN = 7,
USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
CHANNEL_FOLLOW_ADD = 12,
GUILD_DISCOVERY_DISQUALIFIED = 14,
GUILD_DISCOVERY_REQUALIFIED = 15
}
internal class MessageActivityModel
{
public MessageActivityType Type { get; set; }
public string PartyId { get; set; }
}
public enum MessageActivityType
{
JOIN = 1,
SPECTATE = 2,
LISTEN = 3,
JOIN_REQUEST = 5
}
internal class MessageApplicationModel
{
public string Id { get; set; }
public string CoverImage { get; set; }
public string Description { get; set; }
public string Icon { get; set; }
public string Name { get; set; }
}
internal class MessageReferenceModel
{
public string MessageId { get; set; }
public string ChannelId { get; set; }
public string GuildId { get; set; }
}
public enum MessageFlags
{
CROSSPOSTED = 1, // this message has been published to subscribed channels (via Channel Following)
IS_CROSSPOST = 2, // this message originated from a message in another channel (via Channel Following)
SUPPRESS_EMBEDS = 4, // do not include any embeds when serializing this message
SOURCE_MESSAGE_DELETED = 8, // the source message for this crosspost has been deleted (via Channel Following)
URGENT = 16, // this message came from the urgent message system
}
internal class MessageBulkModel
{
public string[] Ids { get; set; }
public string ChannelId { get; set; }
public string GuildId { get; set; }
}
}