private void ToggleDeleteMessageForModule(GuildAccount guild, ModuleInfo module) { for (int i = 0; i < module.Commands.Count; i++) { guild.ToggleDeleteMsgOnCommand(_commands.FormatCommandName(module.Commands[i])); } for (int i = 0; i < module.Submodules.Count; i++) { ToggleDeleteMessageForModule(guild, module.Submodules[i]); } }
internal void ToggleDeleteMessageForCommandOrModule(GuildAccount guild, string input) { var result = _commands.AdvancedSearch(input); if (result.Module is null) { guild.ToggleDeleteMsgOnCommand(_commands.FormatCommandName(result.Command)); } else { ToggleDeleteMessageForModule(guild, result.Module); } }