Added required parameter to GetService

This commit is contained in:
RogueException
2015-11-09 01:35:02 -04:00
parent 093095e410
commit 2e4f880563
7 changed files with 19 additions and 28 deletions

View File

@@ -109,9 +109,7 @@ namespace Discord.Modules
public void CreateCommands(string prefix, Action<CommandGroupBuilder> config)
{
var commandService = _client.Commands();
if (commandService == null)
throw new InvalidOperationException($"{nameof(CommandService)} must be added to DiscordClient before this property is accessed.");
var commandService = _client.Commands(true);
commandService.CreateGroup(prefix, x =>
{
x.Category(_name);