Ejemplo n.º 1
0
        public static ICommandGroup GetOrCreateGroup(string prefix, CmdGroupInitializer groupInitializer = null)
        {
            prefix = prefix.ToLower();
            CommandGroup group = instance.commandGroups.Find(x => x.Prefix == prefix);

            if (group == null)
            {
                group = new CommandGroup(prefix);
                instance.commandGroups.Add(group);
                group.AddCommands(groupInitializer);
            }

            return(group);
        }