Ejemplo n.º 1
0
        public Task GenerateCommandsList()
        {
            var cmds = _cmds.Commands.Select(c => (model: CommandStrings.GetCommandStringModel(c.Name), cmd: c)).GroupBy(m => m.cmd.Module.IsSubmodule ? m.cmd.Module.Parent : m.cmd.Module).OrderBy(g => g.Key.Name).ToDictionary(k => k.Key.Name.ToLower(), k => k.Select(c => c.model).Distinct().OrderBy(c => c.Name).ToArray());

            Directory.CreateDirectory("./docs/");
            var serializer = new SerializerBuilder().DisableAliases().Build();

            File.WriteAllText("./docs/commandstrings.yaml", serializer.Serialize(cmds));
            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
 public Aliases([CallerMemberName] string memberName = "") : base(CommandStrings.GetCommandStringModel(memberName.ToLowerInvariant()).Aliases)
 {
 }
Ejemplo n.º 3
0
 public NadekoCommand([CallerMemberName] string memberName = "")
     : base(CommandStrings.GetCommandStringModel(memberName.ToLowerInvariant()).Command)
 {
 }
Ejemplo n.º 4
0
 public Description([CallerMemberName] string memberName = "") : base(CommandStrings.GetCommandStringModel(memberName.ToLowerInvariant()).Description)
 {
 }
Ejemplo n.º 5
0
 public Usage([CallerMemberName] string memberName = "") : base(CommandStrings.GetCommandStringModel(memberName.ToLowerInvariant()).Usage)
 {
 }
Ejemplo n.º 6
0
 public Usage([CallerMemberName] string memberName = "") : base(CommandStrings.GetCommandStringModel(memberName).Usage)
 {
 }
Ejemplo n.º 7
0
 public Aliases([CallerMemberName] string memberName = "") : base(CommandStrings.GetCommandStringModel(memberName).Aliases)
 {
 }
Ejemplo n.º 8
0
 public Description([CallerMemberName] string memberName = "") : base(CommandStrings.GetCommandStringModel(memberName).Description)
 {
 }
Ejemplo n.º 9
0
 public MitternachtCommand([CallerMemberName] string memberName = "") : base(CommandStrings.GetCommandStringModel(memberName).Command)
 {
 }