<commit_before><?php
	class ModuleManager
	{
		private $Caller = null;

		private $Modules = null;

		public function __construct(WhatsBotCaller &$Caller) //WhatsProt &$Whatsapp)
		{
			$this->Caller = &$Caller;

			$this->Modules = array();
		}

		public function LoadModules()
		{
			$Modules = file_get_contents('config/Modules.json');
			$Modules = json_decode($Modules, true)['modules'];

			foreach($Modules as $Module)
			{
				$this->Load($Module);
			}
		}

		public function LoadIncludes()
		{
			$Includes = file_get_contents('config/Modules.json');
			$Includes = json_decode($Includes, true)['includes'];

			foreach($Includes as $Include)
			{
				include($Include);
			}
		}

		private function Load($Name)
		{
			$Filename = "class/modules/{$Name}.json";

			if(is_file($Filename))
			{
				$Data = file_get_contents($Filename);
				$Data = json_decode($Data, true);

				$this->Modules[$Name] = array
				(
					'version' => $Data['version'],
					'code' => $Data['code']
				);
			}
		}

		private function UpdateModule($Name)
		{

		}

		public function CallModule($Name, $Params, $From, $Original, $Data)
		{
			if(isset($this->Modules[strtolower($Name)]))
				return $this->Caller->CallModule($this->Modules[strtolower($Name)]['code'], $Name, $Params, $From, $Original, $Data);
			else
				return false;
		}
	}<commit_msg>Agregamos algunas funciones para el módulo de ayuda<commit_after><?php
	class ModuleManager
	{
		private $Caller = null;

		private $Modules = null;

		public function __construct(WhatsBotCaller &$Caller) //WhatsProt &$Whatsapp)
		{
			$this->Caller = &$Caller;

			$this->Modules = array();
		}

		public function LoadModules()
		{
			$Modules = file_get_contents('config/Modules.json');
			$Modules = json_decode($Modules, true)['modules'];

			foreach($Modules as $Module)
			{
				$this->Load($Module);
			}
		}

		public function LoadIncludes()
		{
			$Includes = file_get_contents('config/Modules.json');
			$Includes = json_decode($Includes, true)['includes'];

			foreach($Includes as $Include)
			{
				include($Include);
			}
		}

		private function Load($Name)
		{
			$Filename = "class/modules/{$Name}.json";

			if(is_file($Filename))
			{
				$Data = file_get_contents($Filename);
				$Data = json_decode($Data, true);

				$this->Modules[$Name] = array
				(
					'help' => $Data['help'],
					'version' => $Data['version'],
					'code' => $Data['code']
				);
				return true;
			}

			return false;
		}

		private function UpdateModule($Name)
		{

		}

		public function CallModule($Name, $Params, $From, $Original, $Data)
		{
			if(isset($this->Modules[strtolower($Name)]))
				return $this->Caller->CallModule($this->Modules[strtolower($Name)]['code'], $Name, $Params, $From, $Original, $Data);
			else
				return false;
		}

		public function ModuleExists($Name)
		{
			return isset($this->Modules[$Name]);
		}

		public function GetModules()
		{
			return array_keys($this->Modules);
		}

		public function GetModuleHelp($Name)
		{
			if(isset($this->Modules[$Name]))
				return $this->Modules[$Name]['help'];

			return false;
		}
	}
{'fraction_non_alphanumeric': 0.17204648160103292, 'fraction_numerical': 0.0, 'mean_word_length': 3.611607142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7450889', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1060, 'n_words': 193}