This commit is contained in:
2022-06-03 22:28:22 +03:00
parent 3e01e75de3
commit ab6f14e74c
21 changed files with 358 additions and 264 deletions

View File

@@ -75,11 +75,12 @@ namespace DiscordBot.Discord.Commands
string normalCommands = "";
string DMCommands = "";
foreach (var cmd in PluginLoader.Commands!)
foreach (var cmd in PluginLoader.Plugins!)
{
if (cmd.canUseDM) DMCommands += cmd.Command + " ";
if (cmd.canUseDM)
DMCommands += cmd.Command + " ";
if (cmd.requireAdmin)
adminCommands += cmd.Command + " ";
adminCommands += cmd.Command + " ";
else if (cmd.canUseServer) normalCommands += cmd.Command + " ";
}
@@ -93,7 +94,7 @@ namespace DiscordBot.Discord.Commands
private EmbedBuilder GenerateHelpCommand(string command)
{
EmbedBuilder embedBuilder = new EmbedBuilder();
DBCommand cmd = PluginLoader.Commands.Find(p => p.Command == command);
DBCommand cmd = PluginLoader.Plugins.Find(p => p.Command == command);
if (cmd == null)
return null;

View File

@@ -80,7 +80,7 @@ namespace PluginManager.Core
services: null
);
DBCommand plugin = PluginLoader.Commands!.Where(p => p.Command == (message.Content.Split(' ')[0]).Substring(botPrefix.Length)).FirstOrDefault();
DBCommand plugin = PluginLoader.Plugins!.Where(p => p.Command == (message.Content.Split(' ')[0]).Substring(botPrefix.Length)).FirstOrDefault();
if (plugin != null)