diff --git a/VpSharp.Commands/CommandContext.cs b/VpSharp.Commands/CommandContext.cs
index fb6ed1f..ce2f9d9 100644
--- a/VpSharp.Commands/CommandContext.cs
+++ b/VpSharp.Commands/CommandContext.cs
@@ -9,12 +9,10 @@ namespace VpSharp.Commands;
///
public sealed class CommandContext
{
- private readonly VirtualParadiseClient _client;
-
internal CommandContext(VirtualParadiseClient client, VirtualParadiseAvatar avatar, string commandName, string alias,
string rawArguments)
{
- _client = client;
+ Client = client;
Avatar = avatar;
CommandName = commandName;
Alias = alias;
@@ -39,6 +37,12 @@ public sealed class CommandContext
///
/// The executing avatar.
public VirtualParadiseAvatar Avatar { get; }
+
+ ///
+ /// Gets the client which raised the event.
+ ///
+ /// The Virtual Paradise client.
+ public VirtualParadiseClient Client { get; }
///
/// Gets the command name.
@@ -64,7 +68,7 @@ public sealed class CommandContext
public Task RespondAsync(string message, bool ephemeral = false)
{
return ephemeral
- ? Avatar.SendMessageAsync(_client.CurrentAvatar?.Name, message, FontStyle.Regular, Color.Black)
- : _client.SendMessageAsync(message);
+ ? Avatar.SendMessageAsync(Client.CurrentAvatar?.Name, message, FontStyle.Regular, Color.Black)
+ : Client.SendMessageAsync(message);
}
}