feat: add Context.CommandPrefix

This commit is contained in:
spiral 2022-05-02 14:53:08 -04:00
parent bc2cfbeba3
commit 1b5efb6669
No known key found for this signature in database
GPG Key ID: 244A11E4B0BCF40E

View File

@ -44,6 +44,7 @@ public class Context
_metrics = provider.Resolve<IMetrics>();
_provider = provider;
_commandMessageService = provider.Resolve<CommandMessageService>();
CommandPrefix = message.Content?.Substring(0, commandParseOffset);
Parameters = new Parameters(message.Content?.Substring(commandParseOffset));
Rest = provider.Resolve<DiscordApiClient>();
Cluster = provider.Resolve<Cluster>();
@ -70,6 +71,7 @@ public class Context
public readonly SystemConfig Config;
public DateTimeZone Zone => Config?.Zone ?? DateTimeZone.Utc;
public readonly string CommandPrefix;
public readonly Parameters Parameters;
internal readonly IDatabase Database;