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,26 @@
using Discord.Commands;
using Discord.WebSocket;
using DiscordBotCore.Logging;
namespace DiscordBotCore.PluginCore.Helpers.Execution.DbCommand;
public class DbCommandExecutingArgument : IDbCommandExecutingArgument
{
public SocketCommandContext Context { get; init; }
public string CleanContent { get; init; }
public string CommandUsed { get; init; }
public string[]? Arguments { get; init; }
public ILogger Logger { get; init; }
public DirectoryInfo PluginBaseDirectory { get; init; }
public DbCommandExecutingArgument(ILogger logger, SocketCommandContext context, string cleanContent, string commandUsed, string[]? arguments, DirectoryInfo pluginBaseDirectory)
{
this.Logger = logger;
this.Context = context;
this.CleanContent = cleanContent;
this.CommandUsed = commandUsed;
this.Arguments = arguments;
this.PluginBaseDirectory = pluginBaseDirectory;
}
}

View File

@@ -0,0 +1,16 @@
using Discord.Commands;
using Discord.WebSocket;
using DiscordBotCore.Logging;
namespace DiscordBotCore.PluginCore.Helpers.Execution.DbCommand;
public interface IDbCommandExecutingArgument
{
ILogger Logger { get; init; }
string CleanContent { get; init; }
string CommandUsed { get; init; }
string[]? Arguments { get; init; }
SocketCommandContext Context { get; init; }
public DirectoryInfo PluginBaseDirectory { get; init; }
}

View File

@@ -0,0 +1,20 @@
using Discord.WebSocket;
using DiscordBotCore.Logging;
namespace DiscordBotCore.PluginCore.Helpers.Execution.DbEvent;
public class DbEventExecutingArgument : IDbEventExecutingArgument
{
public ILogger Logger { get; }
public DiscordSocketClient Client { get; }
public string BotPrefix { get; }
public DirectoryInfo PluginBaseDirectory { get; }
public DbEventExecutingArgument(ILogger logger, DiscordSocketClient client, string botPrefix, DirectoryInfo pluginBaseDirectory)
{
Logger = logger;
Client = client;
BotPrefix = botPrefix;
PluginBaseDirectory = pluginBaseDirectory;
}
}

View File

@@ -0,0 +1,12 @@
using Discord.WebSocket;
using DiscordBotCore.Logging;
namespace DiscordBotCore.PluginCore.Helpers.Execution.DbEvent;
public interface IDbEventExecutingArgument
{
public ILogger Logger { get; }
public DiscordSocketClient Client { get; }
public string BotPrefix { get; }
public DirectoryInfo PluginBaseDirectory { get; }
}

View File

@@ -0,0 +1,8 @@
namespace DiscordBotCore.PluginCore.Helpers;
public interface IInternalActionOption
{
string OptionName { get; set; }
string OptionDescription { get; set; }
List<InternalActionOption> SubOptions { get; set; }
}

View File

@@ -0,0 +1,23 @@
namespace DiscordBotCore.PluginCore.Helpers;
public class InternalActionOption : IInternalActionOption
{
public string OptionName { get; set; }
public string OptionDescription { get; set; }
public List<InternalActionOption> SubOptions { get; set; }
public InternalActionOption(string optionName, string optionDescription, List<InternalActionOption> subOptions)
{
OptionName = optionName;
OptionDescription = optionDescription;
SubOptions = subOptions;
}
public InternalActionOption(string optionName, string optionDescription)
{
OptionName = optionName;
OptionDescription = optionDescription;
SubOptions = new List<InternalActionOption>();
}
}

View File

@@ -0,0 +1,8 @@
namespace DiscordBotCore.PluginCore.Helpers;
public enum InternalActionRunType
{
OnStartup,
OnCall,
OnStartupAndCall
}