// WingsEmu // // Developed by NosWings Team using System; using System.Threading.Tasks; using Qmmands; using WingsEmu.Commands.Entities; namespace WingsEmu.Commands.Interfaces { public interface ICommandContainer { /// /// Represents the Qmmands Container for DependencyInjection /// IServiceProvider Services { get; } /// /// Asynchronously adds a module to CommandContainer. /// void AddModule() where T : SaltyModuleBase; /// /// Asynchronously removes a module from the CommandContainer. /// /// s void RemoveModule() where T : SaltyModuleBase; /// /// Returns a module by its name; /// /// /// Name of the module. If the module has a Name attribute, the name will be the value of that /// attribute. If it doesn't, the name is the class name. /// /// Case sensitive. /// Module[] GetModulesByName(string name, bool caseSensitive = true); /// /// Returns a command by its name. /// /// Name of the command. /// Case sensitive. /// Command[] GetCommandsByName(string name, bool caseSensitive = true); /* /// /// Removes a command by its name. /// /// Name of the command. /// Case sensitive. /// Task RemoveCommandsAsync(string commandName, bool caseSensitive = true); /// /// Removes the specified commands from the CommandContainer. /// As it doesn't internaly exist, we will find the module of this command and rebuilt it without that command. /// /// Commands to remove. /// Task RemoveCommandsAsync(Command[] command); /// /// Removes the specified command from the CommandContainer. /// As it doesn't internaly exist, we will find the module of this command and rebuilt it without that command. /// /// Command to remove. /// Task RemoveCommandAsync(Command command); */ /// /// Adds a typeparser to the CommandContainer. /// /// Instance of the TypeParser to add. void AddTypeParser(TypeParser typeParser); /// /// Method which will parse the message and try to execute the command. /// /// Raw message to parse. /// Entity that sent the message. Task HandleMessageAsync(string message, object entity, string prefix); } }