Redesigned the DiscordBotCore by splitting it into multiple projects. Created a WebUI and preparing to remove the DiscordBot application
This commit is contained in:
47
DiscordBotCore.PluginCore/Interfaces/IDbCommand.cs
Normal file
47
DiscordBotCore.PluginCore/Interfaces/IDbCommand.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using DiscordBotCore.Logging;
|
||||
using DiscordBotCore.PluginCore.Helpers;
|
||||
using DiscordBotCore.PluginCore.Helpers.Execution.DbCommand;
|
||||
|
||||
namespace DiscordBotCore.PluginCore.Interfaces;
|
||||
|
||||
public interface IDbCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Command to be executed
|
||||
/// It's CaSe SeNsItIvE
|
||||
/// </summary>
|
||||
string Command { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Command aliases. Users may use this to execute the command
|
||||
/// </summary>
|
||||
List<string>? Aliases { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Command description
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The usage for your command.
|
||||
/// It will be displayed when users type help
|
||||
/// </summary>
|
||||
string Usage { get; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the command requre admin, otherwise false
|
||||
/// </summary>
|
||||
bool RequireAdmin { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The main body of the command. This is what is executed when user calls the command in Server
|
||||
/// </summary>
|
||||
/// <param name="args">The Discord Context</param>
|
||||
Task ExecuteServer(IDbCommandExecutingArgument args) => Task.CompletedTask;
|
||||
|
||||
/// <summary>
|
||||
/// The main body of the command. This is what is executed when user calls the command in DM
|
||||
/// </summary>
|
||||
/// <param name="args">The Discord Context</param>
|
||||
Task ExecuteDm(IDbCommandExecutingArgument args) => Task.CompletedTask;
|
||||
}
|
||||
23
DiscordBotCore.PluginCore/Interfaces/IDbEvent.cs
Normal file
23
DiscordBotCore.PluginCore/Interfaces/IDbEvent.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using DiscordBotCore.PluginCore.Helpers;
|
||||
using DiscordBotCore.PluginCore.Helpers.Execution.DbEvent;
|
||||
|
||||
namespace DiscordBotCore.PluginCore.Interfaces;
|
||||
|
||||
public interface IDbEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the event
|
||||
/// </summary>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The description of the event
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The method that is invoked when the event is loaded into memory
|
||||
/// </summary>
|
||||
/// <param name="args">The arguments for the start method</param>
|
||||
Task Start(IDbEventExecutingArgument args);
|
||||
}
|
||||
22
DiscordBotCore.PluginCore/Interfaces/IDbSlashCommand.cs
Normal file
22
DiscordBotCore.PluginCore/Interfaces/IDbSlashCommand.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
using DiscordBotCore.Logging;
|
||||
|
||||
namespace DiscordBotCore.PluginCore.Interfaces;
|
||||
|
||||
public interface IDbSlashCommand
|
||||
{
|
||||
string Name { get; }
|
||||
string Description { get; }
|
||||
bool CanUseDm { get; }
|
||||
bool HasInteraction { get; }
|
||||
|
||||
List<SlashCommandOptionBuilder> Options { get; }
|
||||
|
||||
void ExecuteServer(ILogger logger, SocketSlashCommand context)
|
||||
{ }
|
||||
|
||||
void ExecuteDm(ILogger logger, SocketSlashCommand context) { }
|
||||
|
||||
Task ExecuteInteraction(ILogger logger, SocketInteraction interaction) => Task.CompletedTask;
|
||||
}
|
||||
Reference in New Issue
Block a user