From 83f0e858832be960b4526ea0f5722fa6a0c1bc66 Mon Sep 17 00:00:00 2001 From: FiniteReality Date: Thu, 18 Aug 2016 13:45:58 +0100 Subject: [PATCH] Fix #202 by adding a Prefix property --- src/Discord.Net.Commands/Module.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Commands/Module.cs b/src/Discord.Net.Commands/Module.cs index f965d78ab..7eba5d8a0 100644 --- a/src/Discord.Net.Commands/Module.cs +++ b/src/Discord.Net.Commands/Module.cs @@ -11,6 +11,7 @@ namespace Discord.Commands public TypeInfo Source { get; } public CommandService Service { get; } public string Name { get; } + public string Prefix { get; } public string Summary { get; } public string Description { get; } public IEnumerable Commands { get; } @@ -23,6 +24,7 @@ namespace Discord.Commands Source = source; Service = service; Name = source.Name; + Prefix = moduleAttr.Prefix ?? ""; Instance = instance; var summaryAttr = source.GetCustomAttribute(); @@ -34,7 +36,7 @@ namespace Discord.Commands Description = descriptionAttr.Text; List commands = new List(); - SearchClass(source, instance, commands, moduleAttr.Prefix ?? ""); + SearchClass(source, instance, commands, Prefix); Commands = commands; Preconditions = BuildPreconditions();