Add project files.

This commit is contained in:
Wizzy69
2022-01-07 20:26:10 +02:00
parent 8b8d4c7147
commit 84ee5c6235
53 changed files with 3544 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using Discord.Commands;
using Discord.WebSocket;
using PluginManager.Loaders;
using PluginManager.Interfaces;
namespace PluginManager.Commands
{
internal class Help : DBCommand
{
public string Command => "help";
public string Description => "This command allows you to check all loadded commands";
public string Usage => "help";
public bool canUseDM => true;
public bool canUseServer => true;
public void Execute(SocketCommandContext context, SocketMessage message, DiscordSocketClient client, bool isDM)
{
if (isDM)
{
foreach (DBCommand p in PluginLoader.Plugins!)
if (p.canUseDM)
context.Channel.SendMessageAsync(p.Usage + "\t" + p.Description);
}
else
{
foreach (DBCommand p in PluginLoader.Plugins!)
if (p.canUseServer)
context.Channel.SendMessageAsync(p.Usage + "\t" + p.Description);
}
}
}
}