This commit is contained in:
2022-06-08 18:54:58 +03:00
parent c66ff52d94
commit 531edcd3cc
55 changed files with 2253 additions and 2360 deletions

View File

@@ -1,49 +1,51 @@
namespace PluginManager.Interfaces
using Discord.Commands;
using Discord.WebSocket;
namespace PluginManager.Interfaces;
public interface DBCommand
{
public interface DBCommand
{
/// <summary>
/// Command to be executed
/// It's CaSe SeNsItIvE
/// </summary>
string Command { get; }
/// <summary>
/// Command to be executed
/// It's CaSe SeNsItIvE
/// </summary>
string Command { get; }
/// <summary>
/// Command description
/// </summary>
string Description { 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>
/// The usage for your command.
/// It will be displayed when users type help
/// </summary>
string Usage { get; }
/// <summary>
/// true if the command can be used in a DM channel, otherwise false
/// </summary>
bool canUseDM { get; }
/// <summary>
/// true if the command can be used in a DM channel, otherwise false
/// </summary>
bool canUseDM { get; }
/// <summary>
/// true if the command can be used in a server, otherwise false
/// </summary>
bool canUseServer { get; }
/// <summary>
/// true if the command can be used in a server, otherwise false
/// </summary>
bool canUseServer { get; }
/// <summary>
/// true if the command requre admin, otherwise false
/// </summary>
bool requireAdmin { 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
/// </summary>
/// <param name="context">The disocrd Context</param>
/// <param name="message">The message that the user types</param>
/// <param name="client">The discord client of the bot</param>
/// <param name="isDM">true if the message was sent from DM, otherwise false. It is always false if canUseDM is false</param>
void Execute(Discord.Commands.SocketCommandContext context,
Discord.WebSocket.SocketMessage message,
Discord.WebSocket.DiscordSocketClient client,
bool isDM);
}
}
/// <summary>
/// The main body of the command. This is what is executed when user calls the command
/// </summary>
/// <param name="context">The disocrd Context</param>
/// <param name="message">The message that the user types</param>
/// <param name="client">The discord client of the bot</param>
/// <param name="isDM">true if the message was sent from DM, otherwise false. It is always false if canUseDM is false</param>
void Execute(SocketCommandContext context,
SocketMessage message,
DiscordSocketClient client,
bool isDM);
}

View File

@@ -1,23 +1,22 @@
using Discord.WebSocket;
namespace PluginManager.Interfaces
namespace PluginManager.Interfaces;
public interface DBEvent
{
public interface DBEvent
{
/// <summary>
/// The name of the event
/// </summary>
string name { get; }
/// <summary>
/// The name of the event
/// </summary>
string name { get; }
/// <summary>
/// The description of the event
/// </summary>
string description { 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="client">The discord bot client</param>
void Start(DiscordSocketClient client);
}
/// <summary>
/// The method that is invoked when the event is loaded into memory
/// </summary>
/// <param name="client">The discord bot client</param>
void Start(DiscordSocketClient client);
}