From c9a281f09e739d9f1e6c0bf36c15a110b318691d Mon Sep 17 00:00:00 2001
From: Quin Lynch <49576606+quinchs@users.noreply.github.com>
Date: Thu, 2 Dec 2021 17:58:59 -0400
Subject: [PATCH] Make IModuleBase and IInteractionModuleBase public (#341)
---
src/Discord.Net.Commands/IModuleBase.cs | 24 +++++++++++++++++--
.../IInteractionModuleBase.cs | 9 ++++++-
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/src/Discord.Net.Commands/IModuleBase.cs b/src/Discord.Net.Commands/IModuleBase.cs
index 3b641ec5f..8b021f4de 100644
--- a/src/Discord.Net.Commands/IModuleBase.cs
+++ b/src/Discord.Net.Commands/IModuleBase.cs
@@ -2,14 +2,34 @@ using Discord.Commands.Builders;
namespace Discord.Commands
{
- internal interface IModuleBase
+ ///
+ /// Represents a generic module base.
+ ///
+ public interface IModuleBase
{
+ ///
+ /// Sets the context of this module base.
+ ///
+ /// The context to set.
void SetContext(ICommandContext context);
+ ///
+ /// Executed before a command is run in this module base.
+ ///
+ /// The command thats about to run.
void BeforeExecute(CommandInfo command);
-
+
+ ///
+ /// Executed after a command is ran in this module base.
+ ///
+ /// The command that ran.
void AfterExecute(CommandInfo command);
+ ///
+ /// Executed when this module is building.
+ ///
+ /// The command service that is building this module.
+ /// The builder constructing this module.
void OnModuleBuilding(CommandService commandService, ModuleBuilder builder);
}
}
diff --git a/src/Discord.Net.Interactions/IInteractionModuleBase.cs b/src/Discord.Net.Interactions/IInteractionModuleBase.cs
index 126b4a67b..e840e6a0f 100644
--- a/src/Discord.Net.Interactions/IInteractionModuleBase.cs
+++ b/src/Discord.Net.Interactions/IInteractionModuleBase.cs
@@ -1,7 +1,14 @@
namespace Discord.Interactions
{
- internal interface IInteractionModuleBase
+ ///
+ /// Represents a generic interaction module base.
+ ///
+ public interface IInteractionModuleBase
{
+ ///
+ /// Sets the context of this module.
+ ///
+ ///
void SetContext (IInteractionContext context);
///