Initial split of the modules
This commit is contained in:
13
NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlocker.cs
Normal file
13
NadekoBot.Core/Common/ModuleBehaviors/IEarlyBlocker.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors
|
||||
{
|
||||
/// <summary>
|
||||
/// Implemented by modules which block execution before anything is executed
|
||||
/// </summary>
|
||||
public interface IEarlyBlocker
|
||||
{
|
||||
Task<bool> TryBlockEarly(IGuild guild, IUserMessage msg);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors
|
||||
{
|
||||
/// <summary>
|
||||
/// Implemented by modules which can execute something and prevent further commands from being executed.
|
||||
/// </summary>
|
||||
public interface IEarlyBlockingExecutor
|
||||
{
|
||||
/// <summary>
|
||||
/// Try to execute some logic within some module's service.
|
||||
/// </summary>
|
||||
/// <returns>Whether it should block other command executions after it.</returns>
|
||||
Task<bool> TryExecuteEarly(DiscordSocketClient client, IGuild guild, IUserMessage msg);
|
||||
}
|
||||
}
|
7
NadekoBot.Core/Common/ModuleBehaviors/IEarlyExecutor.cs
Normal file
7
NadekoBot.Core/Common/ModuleBehaviors/IEarlyExecutor.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.Common.ModuleBehaviors
|
||||
{
|
||||
public interface IEarlyExecutor
|
||||
{
|
||||
|
||||
}
|
||||
}
|
10
NadekoBot.Core/Common/ModuleBehaviors/IINputTransformer.cs
Normal file
10
NadekoBot.Core/Common/ModuleBehaviors/IINputTransformer.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors
|
||||
{
|
||||
public interface IInputTransformer
|
||||
{
|
||||
Task<string> TransformInput(IGuild guild, IMessageChannel channel, IUser user, string input);
|
||||
}
|
||||
}
|
12
NadekoBot.Core/Common/ModuleBehaviors/ILateBlocker.cs
Normal file
12
NadekoBot.Core/Common/ModuleBehaviors/ILateBlocker.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors
|
||||
{
|
||||
public interface ILateBlocker
|
||||
{
|
||||
Task<bool> TryBlockLate(DiscordSocketClient client, IUserMessage msg, IGuild guild,
|
||||
IMessageChannel channel, IUser user, string moduleName, string commandName);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
namespace NadekoBot.Common.ModuleBehaviors
|
||||
{
|
||||
public interface ILateBlockingExecutor
|
||||
{
|
||||
|
||||
}
|
||||
}
|
14
NadekoBot.Core/Common/ModuleBehaviors/ILateExecutor.cs
Normal file
14
NadekoBot.Core/Common/ModuleBehaviors/ILateExecutor.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
|
||||
namespace NadekoBot.Common.ModuleBehaviors
|
||||
{
|
||||
/// <summary>
|
||||
/// Last thing to be executed, won't stop further executions
|
||||
/// </summary>
|
||||
public interface ILateExecutor
|
||||
{
|
||||
Task LateExecute(DiscordSocketClient client, IGuild guild, IUserMessage msg);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user