/
SocketThreadInfo.cs
83 lines (73 loc) · 2.34 KB
/
SocketThreadInfo.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
using Discord.API.AuditLogs;
using System.Collections.Generic;
namespace Discord.WebSocket;
/// <summary>
/// Represents information for a thread.
/// </summary>
public class SocketThreadInfo
{
/// <summary>
/// Gets the name of the thread.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the value that indicates whether the thread is archived.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the property was not updated.
/// </remarks>
public bool? IsArchived { get; }
/// <summary>
/// Gets the auto archive duration of thread.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the property was not updated.
/// </remarks>
public ThreadArchiveDuration? AutoArchiveDuration { get; }
/// <summary>
/// Gets the value that indicates whether the thread is locked.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the property was not updated.
/// </remarks>
public bool? IsLocked { get; }
/// <summary>
/// Gets the slow-mode delay of the thread.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the property was not updated.
/// </remarks>
public int? SlowModeInterval { get; }
/// <summary>
/// Gets the applied tags of this thread.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the property was not updated.
/// </remarks>
public IReadOnlyCollection<ulong> AppliedTags { get; }
/// <summary>
/// Gets the flags of the thread channel.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the property was not updated.
/// </remarks>
public ChannelFlags? Flags { get; }
/// <summary>
/// Gets the type of the thread.
/// </summary>
/// <remarks>
/// <see langword="null"/> if the property was not updated.
/// </remarks>
public ThreadType Type { get; }
internal SocketThreadInfo(ThreadInfoAuditLogModel model)
{
Name = model.Name;
IsArchived = model.IsArchived;
AutoArchiveDuration = model.ArchiveDuration;
IsLocked = model.IsLocked;
SlowModeInterval = model.SlowModeInterval;
AppliedTags = model.AppliedTags;
Flags = model.ChannelFlags;
Type = model.Type;
}
}