|
|
@@ -1,3 +1,4 @@ |
|
|
|
using Discord.Commands.Builders; |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
@@ -23,7 +24,7 @@ namespace Discord.Commands |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual void OnModuleBuilding(CommandService commandService) |
|
|
|
protected virtual void OnModuleBuilding(CommandService commandService, ModuleBuilder builder) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
@@ -33,11 +34,8 @@ namespace Discord.Commands |
|
|
|
var newValue = context as T; |
|
|
|
Context = newValue ?? throw new InvalidOperationException($"Invalid context type. Expected {typeof(T).Name}, got {context.GetType().Name}"); |
|
|
|
} |
|
|
|
|
|
|
|
void IModuleBase.BeforeExecute(CommandInfo command) => BeforeExecute(command); |
|
|
|
|
|
|
|
void IModuleBase.AfterExecute(CommandInfo command) => AfterExecute(command); |
|
|
|
|
|
|
|
void IModuleBase.OnModuleBuilding(CommandService commandService) => OnModuleBuilding(commandService); |
|
|
|
void IModuleBase.OnModuleBuilding(CommandService commandService, ModuleBuilder builder) => OnModuleBuilding(commandService, builder); |
|
|
|
} |
|
|
|
} |