-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
DisCatSharpCommandContext.cs
73 lines (60 loc) · 1.94 KB
/
DisCatSharpCommandContext.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
using DisCatSharp.Enums.Core;
namespace DisCatSharp.Entities.Core;
/// <summary>
/// Interface for various command types like slash commands, user commands, message commands, text commands, etc.
/// </summary>
public class DisCatSharpCommandContext
{
/// <summary>
/// Gets the client.
/// </summary>
public DiscordClient Client { get; internal init; }
/// <summary>
/// Gets the id of the user who executes this command.
/// </summary>
public ulong UserId { get; internal set; }
/// <summary>
/// Gets the id of the channel this command gets executed in.
/// </summary>
public ulong ChannelId { get; internal set; }
/// <summary>
/// Gets the id of the guild this command gets executed in.
/// </summary>
public ulong? GuildId { get; internal set; }
/// <summary>
/// Gets the id of the member who executes this command.
/// </summary>
public ulong? MemberId { get; internal set; }
/// <summary>
/// Gets the id of the command.
/// </summary>
public ulong? CommandId { get; internal set; }
/// <summary>
/// Gets the name of the command.
/// </summary>
public string CommandName { get; internal set; } = string.Empty;
/// <summary>
/// Gets the name of the sub command.
/// </summary>
public string? SubCommandName { get; internal set; }
/// <summary>
/// Gets the name of the sub command within a sub group.
/// </summary>
public string? SubSubCommandName { get; internal set; }
/// <summary>
/// Gets the fully qualified name of the command.
/// </summary>
public virtual string FullCommandName { get; internal set; } = string.Empty;
/// <summary>
/// Gets the type of the command.
/// </summary>
public DisCatSharpCommandType CommandType { get; internal set; }
/// <summary>
/// Initializes a new instance of the <see cref="DisCatSharpCommandContext"/> class.
/// </summary>
/// <param name="type">The command type.</param>
internal DisCatSharpCommandContext(DisCatSharpCommandType type)
{
this.CommandType = type;
}
}