mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
- Removed NadekoCommand and Aliases attribute from all commands
- All commands must be marked as partial - Added [Cmd] Attribute to all commands - Cmd Attribute comes from the source generator which adds [NadekoCommand] and [Aliases] Attribute to each command - Should be updated in the future probably to be more performant and maybe add extra data to the commands - Started reorganizing modules and submodules
This commit is contained in:
@@ -3,17 +3,16 @@ namespace NadekoBot.Modules.Utility;
|
||||
|
||||
public partial class Utility
|
||||
{
|
||||
public class ConfigCommands : NadekoSubmodule
|
||||
public partial class ConfigCommands : NadekoSubmodule
|
||||
{
|
||||
private readonly IEnumerable<IConfigService> _settingServices;
|
||||
|
||||
public ConfigCommands(IEnumerable<IConfigService> settingServices)
|
||||
=> _settingServices = settingServices;
|
||||
|
||||
[NadekoCommand]
|
||||
[Aliases]
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public async Task ConfigReload(string name)
|
||||
public async partial Task ConfigReload(string name)
|
||||
{
|
||||
var setting = _settingServices.FirstOrDefault(x
|
||||
=> x.Name.StartsWith(name, StringComparison.InvariantCultureIgnoreCase));
|
||||
@@ -34,10 +33,9 @@ public partial class Utility
|
||||
await ctx.OkAsync();
|
||||
}
|
||||
|
||||
[NadekoCommand]
|
||||
[Aliases]
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public async Task Config(string name = null, string prop = null, [Leftover] string value = null)
|
||||
public async partial Task Config(string name = null, string prop = null, [Leftover] string value = null)
|
||||
{
|
||||
var configNames = _settingServices.Select(x => x.Name);
|
||||
|
||||
|
Reference in New Issue
Block a user