Browse Source

Make IModuleBase and IInteractionModuleBase public (#341)

pull/1958/head
Quin Lynch GitHub 3 years ago
parent
commit
c9a281f09e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 3 deletions
  1. +22
    -2
      src/Discord.Net.Commands/IModuleBase.cs
  2. +8
    -1
      src/Discord.Net.Interactions/IInteractionModuleBase.cs

+ 22
- 2
src/Discord.Net.Commands/IModuleBase.cs View File

@@ -2,14 +2,34 @@ using Discord.Commands.Builders;

namespace Discord.Commands
{
internal interface IModuleBase
/// <summary>
/// Represents a generic module base.
/// </summary>
public interface IModuleBase
{
/// <summary>
/// Sets the context of this module base.
/// </summary>
/// <param name="context">The context to set.</param>
void SetContext(ICommandContext context);

/// <summary>
/// Executed before a command is run in this module base.
/// </summary>
/// <param name="command">The command thats about to run.</param>
void BeforeExecute(CommandInfo command);

/// <summary>
/// Executed after a command is ran in this module base.
/// </summary>
/// <param name="command">The command that ran.</param>
void AfterExecute(CommandInfo command);

/// <summary>
/// Executed when this module is building.
/// </summary>
/// <param name="commandService">The command service that is building this module.</param>
/// <param name="builder">The builder constructing this module.</param>
void OnModuleBuilding(CommandService commandService, ModuleBuilder builder);
}
}

+ 8
- 1
src/Discord.Net.Interactions/IInteractionModuleBase.cs View File

@@ -1,7 +1,14 @@
namespace Discord.Interactions
{
internal interface IInteractionModuleBase
/// <summary>
/// Represents a generic interaction module base.
/// </summary>
public interface IInteractionModuleBase
{
/// <summary>
/// Sets the context of this module.
/// </summary>
/// <param name="context"></param>
void SetContext (IInteractionContext context);

/// <summary>


Loading…
Cancel
Save