Redesigned the DiscordBotCore by splitting it into multiple projects. Created a WebUI and preparing to remove the DiscordBot application
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace DiscordBotCore.PluginCore.Helpers;
|
||||
|
||||
public interface IInternalActionOption
|
||||
{
|
||||
string OptionName { get; set; }
|
||||
string OptionDescription { get; set; }
|
||||
List<InternalActionOption> SubOptions { get; set; }
|
||||
}
|
||||
23
DiscordBotCore.PluginCore/Helpers/InternalActionOption.cs
Normal file
23
DiscordBotCore.PluginCore/Helpers/InternalActionOption.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace DiscordBotCore.PluginCore.Helpers;
|
||||
|
||||
public enum InternalActionRunType
|
||||
{
|
||||
OnStartup,
|
||||
OnCall,
|
||||
OnStartupAndCall
|
||||
}
|
||||
Reference in New Issue
Block a user