-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Structs.cs
630 lines (440 loc) · 18.7 KB
/
Structs.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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
namespace Cliptok
{
public class UserWarning
{
[JsonProperty("targetUserId")]
public ulong TargetUserId { get; set; }
[JsonProperty("modUserId")]
public ulong ModUserId { get; set; }
[JsonProperty("warningId")]
public long WarningId { get; set; }
[JsonProperty("warnReason")]
public string WarnReason { get; set; }
[JsonProperty("warnTimestamp")]
public DateTime WarnTimestamp { get; set; }
[JsonProperty("contextLink")]
public string ContextLink { get; set; }
[JsonProperty("contextMessageReference")]
public MessageReference ContextMessageReference { get; set; } = default;
[JsonProperty("dmMessageReference")]
public MessageReference DmMessageReference { get; set; } = default;
[JsonProperty("type")]
public WarningType Type { get; set; }
}
public class MessageReference
{
[JsonProperty("messageId")]
public ulong MessageId { get; set; } = 0;
[JsonProperty("channelId")]
public ulong ChannelId { get; set; } = 0;
}
public class MemberPunishment
{
[JsonProperty("memberId")]
public ulong MemberId { get; set; }
[JsonProperty("actionTime")]
public DateTime? ActionTime { get; set; }
[JsonProperty("expireTime")]
public DateTime? ExpireTime { get; set; }
[JsonProperty("modId")]
public ulong ModId { get; set; }
[JsonProperty("serverId")]
public ulong ServerId { get; set; }
[JsonProperty("reason")]
public string Reason { get; set; }
[JsonProperty("contextMessageReference")]
public MessageReference ContextMessageReference { get; set; }
[JsonProperty("dmMessageReference")]
public MessageReference DmMessageReference { get; set; }
}
public class ConfigJson
{
[JsonProperty("core")]
public CoreConfig Core { get; private set; }
[JsonProperty("redis")]
public RedisConfig Redis { get; private set; }
[JsonProperty("trialModRole")]
public ulong TrialModRole { get; private set; }
[JsonProperty("modRole")]
public ulong ModRole { get; private set; }
[JsonProperty("adminRole")]
public ulong AdminRole { get; private set; }
[JsonProperty("logChannel")]
public ulong LogChannel { get; private set; } = 0;
[JsonProperty("userLogChannel")]
public ulong UserLogChannel { get; private set; } = 0;
[JsonProperty("serverID")]
public ulong ServerID { get; private set; }
[JsonProperty("homeChannel")]
public ulong HomeChannel { get; private set; } = 0;
[JsonProperty("emoji")]
public EmojiJson Emoji { get; private set; }
[JsonProperty("mutedRole")]
public ulong MutedRole { get; private set; }
[JsonProperty("warningDaysThreshold")]
public int WarningDaysThreshold { get; private set; }
[JsonProperty("autoMuteThresholds")]
public Dictionary<string, int> AutoMuteThresholds { get; private set; }
[JsonProperty("recentWarningsPeriodHours")]
public int RecentWarningsPeriodHours { get; private set; }
[JsonProperty("recentWarningsAutoMuteThresholds")]
public Dictionary<string, int> RecentWarningsAutoMuteThresholds { get; private set; }
[JsonProperty("userRoles")]
public UserRoleConfig UserRoles { get; private set; }
[JsonProperty("restrictedWords")]
public List<string> RestrictedWords { get; private set; }
[JsonProperty("massMentionThreshold")]
public int MassMentionThreshold { get; private set; }
[JsonProperty("massEmojiThreshold")]
public int MassEmojiThreshold { get; private set; }
[JsonProperty("tierRoles")]
public List<ulong> TierRoles { get; private set; }
[JsonProperty("inviteExclusion")]
public List<string> InviteExclusion { get; private set; }
[JsonProperty("inviteIDExclusion")]
public List<ulong> InviteIDExclusion { get; private set; }
[JsonProperty("inviteTierRequirement")]
public int InviteTierRequirement { get; private set; }
[JsonProperty("unrestrictedEmojiChannels")]
public List<ulong> UnrestrictedEmojiChannels { get; private set; }
[JsonProperty("wordLists")]
public List<WordListJson> WordListList { get; private set; }
[JsonProperty("lockdownEnabledChannels")]
public List<ulong> LockdownEnabledChannels { get; private set; }
[JsonProperty("heartosoftId")]
public ulong HeartosoftId { get; private set; }
[JsonProperty("autoDehoistCharacters")]
public string AutoDehoistCharacters { get; private set; }
[JsonProperty("investigationsChannel")]
public ulong InvestigationsChannelId { get; private set; }
[JsonProperty("appealLink")]
public string AppealLink { get; private set; }
[JsonProperty("communityTechSupportRoleID")]
public ulong CommunityTechSupportRoleID { get; private set; }
[JsonProperty("techSupportChannel")]
public ulong TechSupportChannel { get; private set; } = 0;
[JsonProperty("supportLogChannel")]
public ulong SupportLogChannel { get; private set; } = 0;
[JsonProperty("supportRatelimitMinutes")]
public int SupportRatelimitMinutes { get; private set; }
[JsonProperty("massMentionBanThreshold")]
public int MassMentionBanThreshold { get; private set; }
[JsonProperty("secondaryAutoDehoistCharacters")]
public string SecondaryAutoDehoistCharacters { get; private set; }
[JsonProperty("modmailUserId")]
public ulong ModmailUserId { get; private set; }
[JsonProperty("announcementRoles")]
public Dictionary<string, ulong> AnnouncementRoles { get; private set; }
[JsonProperty("hastebinEndpoint")]
public string HastebinEndpoint { get; private set; }
[JsonProperty("modmailCategory")]
public ulong ModmailCategory { get; private set; }
[JsonProperty("lineLimit")]
public int LineLimit { get; private set; }
[JsonProperty("increasedLineLimit")]
public int IncreasedLineLimit { get; private set; }
[JsonProperty("lineLimitTier")]
public int LineLimitTier { get; private set; }
[JsonProperty("lineLimitExcludedChannels")]
public List<ulong> LineLimitExcludedChannels { get; private set; }
[JsonProperty("giveawaysChannel")]
public ulong GiveawaysChannel { get; private set; } = 0;
[JsonProperty("giveawayBot")]
public ulong GiveawayBot { get; private set; }
[JsonProperty("giveawayTriggerMessage")]
public string GiveawayTriggerMessage { get; private set; }
[JsonProperty("githubWorkflow")]
public WorkflowConfig GitHubWorkFlow { get; private set; }
[JsonProperty("everyoneExcludedChannels")]
public List<ulong> EveryoneExcludedChannels { get; private set; } = new();
[JsonProperty("gitListDirectory")]
public string GitListDirectory { get; private set; }
[JsonProperty("dmLogChannelId")]
public ulong DmLogChannelId { get; private set; } = 0;
[JsonProperty("errorLogChannelId")]
public ulong ErrorLogChannelId { get; private set; } = 0;
[JsonProperty("mysteryLogChannelId")]
public ulong MysteryLogChannelId { get; private set; } = 0;
[JsonProperty("everyoneFilter")]
public bool EveryoneFilter { get; private set; } = false;
[JsonProperty("usernameAPILogChannel")]
public ulong UsernameAPILogChannel { get; private set; } = 0;
[JsonProperty("logChannels")]
public Dictionary<string, LogChannelConfig> LogChannels { get; private set; }
[JsonProperty("botOwners")]
public List<ulong> BotOwners { get; private set; } = new();
[JsonProperty("ignoredVoiceChannels")]
public List<ulong> IgnoredVoiceChannels { get; private set; } = new();
[JsonProperty("enableTextInVoice")]
public bool EnableTextInVoice { get; private set; } = false;
[JsonProperty("tqsRoleId")]
public ulong TqsRoleId { get; private set; } = 0;
[JsonProperty("supportForumIntroThreadId")]
public ulong SupportForumIntroThreadId { get; private set; } = 0;
[JsonProperty("supportForumId")]
public ulong SupportForumId { get; private set; } = 0;
[JsonProperty("everyoneExcludedRoles")]
public List<ulong> EveryoneExcludedRoles { get; private set; } = new();
[JsonProperty("feedbackHubForum")]
public ulong FeedbackHubForum { get; private set; } = 0;
[JsonProperty("forumIntroPosts")]
public List<ulong> ForumIntroPosts { get; private set; } = new();
[JsonProperty("insiderAnnouncementChannel")]
public ulong InsiderAnnouncementChannel { get; private set; } = 0;
[JsonProperty("insiderCommandLockedToChannel")]
public ulong InsiderCommandLockedToChannel { get; private set; } = 0;
[JsonProperty("dmAutoresponseTimeLimit")]
public int DmAutoresponseTimeLimit { get; private set; } = 0;
[JsonProperty("autoDeleteEmptyThreads")]
public bool AutoDeleteEmptyThreads { get; private set; } = false;
[JsonProperty("insiderCanaryThread")]
public ulong InsiderCanaryThread { get; set; } = 0;
[JsonProperty("tqsMutedRole")]
public ulong TqsMutedRole { get; private set; } = 0;
[JsonProperty("tqsMuteDurationHours")]
public int TqsMuteDurationHours { get; private set; }
[JsonProperty("autoWarnMsgAutoDeleteDays")]
public int AutoWarnMsgAutoDeleteDays { get; private set; }
[JsonProperty("compromisedAccountBanMsgAutoDeleteDays")]
public int CompromisedAccountBanMsgAutoDeleteDays { get; private set; }
[JsonProperty("logLevel")]
public Level LogLevel { get; private set; } = Level.Information;
[JsonProperty("lokiURL")]
public string LokiURL { get; private set; } = null;
[JsonProperty("lokiServiceName")]
public string LokiServiceName { get; private set; } = null;
[JsonProperty("voiceChannelPurge")]
public bool VoiceChannelPurge { get; private set; } = true;
[JsonProperty("forumChannelAutoWarnFallbackChannel")]
public ulong ForumChannelAutoWarnFallbackChannel { get; private set; } = 0;
[JsonProperty("rulesAllowedPublicChannels")]
public List<ulong> RulesAllowedPublicChannels { get; private set; } = new();
}
public enum Level { Information, Warning, Error, Debug, Verbose }
public class LogChannelConfig
{
[JsonProperty("channelId")]
public ulong ChannelId { get; private set; } = 0;
[JsonProperty("webhookUrl")]
public string WebhookUrl { get; private set; } = "";
[JsonProperty("webhookEnvVar")]
public string WebhookEnvVar { get; private set; } = "";
}
public class WorkflowConfig
{
[JsonProperty("repo")]
public string Repo { get; private set; }
[JsonProperty("ref")]
public string Ref { get; private set; }
[JsonProperty("workflowId")]
public string WorkflowId { get; private set; }
}
public class WordListJson
{
[JsonProperty("name")]
public string Name { get; private set; }
[JsonProperty("wholeWord")]
public bool WholeWord { get; private set; }
[JsonProperty("url")]
public bool Url { get; private set; }
[JsonProperty("reason")]
public string Reason { get; private set; }
public string[] Words { get; set; }
[JsonProperty("excludedChannels")]
public List<ulong> ExcludedChannels { get; private set; } = new();
[JsonProperty("passive")]
public bool Passive { get; private set; } = false;
[JsonProperty("channelId")]
public ulong? ChannelId { get; private set; }
}
public class EmojiJson
{
[JsonProperty("noPermissions")]
public string NoPermissions { get; set; }
[JsonProperty("warning")]
public string Warning { get; set; }
[JsonProperty("error")]
public string Error { get; set; }
[JsonProperty("deleted")]
public string Deleted { get; set; }
[JsonProperty("information")]
public string Information { get; set; }
[JsonProperty("muted")]
public string Muted { get; set; }
[JsonProperty("denied")]
public string Denied { get; set; }
[JsonProperty("banned")]
public string Banned { get; set; }
[JsonProperty("unbanned")]
public string Unbanned { get; set; }
[JsonProperty("ejected")]
public string Ejected { get; set; }
[JsonProperty("loading")]
public string Loading { get; set; }
[JsonProperty("success")]
public string Success { get; set; }
[JsonProperty("locked")]
public string Locked { get; set; }
[JsonProperty("connected")]
public string Connected { get; set; }
[JsonProperty("help")]
public string Help { get; set; }
[JsonProperty("shieldHelp")]
public string ShieldHelp { get; set; }
[JsonProperty("shieldMicrosoft")]
public string ShieldMicrosoft { get; set; }
[JsonProperty("unlock")]
public string Unlock { get; set; }
[JsonProperty("bsod")]
public string BSOD { get; set; }
[JsonProperty("userJoin")]
public string UserJoin { get; set; }
[JsonProperty("userLeave")]
public string UserLeave { get; set; }
[JsonProperty("userUpdate")]
public string UserUpdate { get; set; }
[JsonProperty("messageEdit")]
public string MessageEdit { get; set; }
[JsonProperty("clockTime")]
public string ClockTime { get; set; }
[JsonProperty("windows11")]
public string Windows11 { get; set; }
[JsonProperty("on")]
public string On { get; set; }
[JsonProperty("off")]
public string Off { get; set; }
[JsonProperty("insider")]
public string Insider { get; set; }
[JsonProperty("windows10")]
public string Windows10 { get; set; }
}
public class CoreConfig
{
[JsonProperty("token")]
public string Token { get; private set; }
[JsonProperty("prefixes")]
public List<string> Prefixes { get; private set; }
}
public class RedisConfig
{
[JsonProperty("host")]
public string Host { get; private set; }
[JsonProperty("port")]
public ulong Port { get; private set; }
}
public class UserRoleConfig
{
[JsonProperty("insiderCanary")]
public ulong InsiderCanary { get; private set; }
[JsonProperty("insiderDev")]
public ulong InsiderDev { get; private set; }
[JsonProperty("insiderBeta")]
public ulong InsiderBeta { get; private set; }
[JsonProperty("insiderRP")]
public ulong InsiderRP { get; private set; }
[JsonProperty("insider10RP")]
public ulong Insider10RP { get; private set; }
[JsonProperty("patchTuesday")]
public ulong PatchTuesday { get; private set; }
[JsonProperty("giveaways")]
public ulong Giveaways { get; private set; }
}
public class PhishingRequestBody
{
[JsonProperty("message")]
public string Message { get; set; }
}
public class PhishingResponseBody
{
[JsonProperty("match")]
public bool Match { get; set; }
[JsonProperty("matches")]
public List<PhishingMatch> Matches { get; set; }
}
public class PhishingMatch
{
[JsonProperty("followed")]
public bool Followed { get; set; }
[JsonProperty("domain")]
public string Domain { get; set; }
[JsonProperty("source")]
public string Source { get; set; }
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("trust_rating")]
public float TrustRating { get; set; }
}
public class UsernameScamApiRequestJson
{
[JsonProperty("username")]
public string Username { get; set; }
}
public class UsernameScamApiResponseJson
{
[JsonProperty("match")]
public bool Match { get; set; }
[JsonProperty("reason")]
public string Reason { get; set; }
}
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public class ServerApiResponseJson
{
[JsonProperty("serverID")]
public string ServerID { get; set; }
[JsonProperty("match")]
public bool Match { get; set; } = true;
[JsonProperty("reason")]
public string Reason { get; set; }
[JsonProperty("key")]
public string Key { get; set; }
[JsonProperty("vanity")]
public string Vanity { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("invite")]
public string Invite { get; set; }
}
public class UserNote
{
[JsonProperty("targetUserId")]
public ulong TargetUserId { get; set; }
[JsonProperty("modUserId")]
public ulong ModUserId { get; set; }
[JsonProperty("noteText")]
public string NoteText { get; set; }
[JsonProperty("showOnModmail")]
public bool ShowOnModmail { get; set; }
[JsonProperty("showOnWarn")]
public bool ShowOnWarn { get; set; }
[JsonProperty("showAllMods")]
public bool ShowAllMods { get; set; }
[JsonProperty("showOnce")]
public bool ShowOnce { get; set; }
[JsonProperty("showOnJoinAndLeave")]
public bool ShowOnJoinAndLeave { get; set; }
[JsonProperty("noteId")]
public long NoteId { get; set; }
[JsonProperty("timestamp")]
public DateTime Timestamp { get; set; }
[JsonProperty("type")]
public WarningType Type { get; set; }
}
public class PendingUserOverride
{
[JsonProperty("channelId")]
public ulong ChannelId { get; set; }
[JsonProperty("overwrite")]
public MockUserOverwrite Overwrite { get; set; }
}
public class MockUserOverwrite
{
[JsonProperty("type")]
public int Type { get; } = 1;
[JsonProperty("allow")]
public DiscordPermissions Allowed { get; set; }
[JsonProperty("deny")]
public DiscordPermissions Denied { get; set; }
[JsonProperty("id")]
public ulong Id { get; set; }
}
}