Redesigned the DiscordBotCore by splitting it into multiple projects. Created a WebUI and preparing to remove the DiscordBot application

This commit is contained in:
2025-04-04 22:07:30 +03:00
parent 62ba5ec63d
commit a4afb28f36
2290 changed files with 76694 additions and 17052 deletions

View 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;
}

View 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);
}

View 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;
}