code: def resolve_extensions(bot: commands.Bot, name: str) -> list:
      
  
      if name.endswith('.*'):
          module_parts = name[:-2].split('.')
          path = pathlib.Path(module_parts.pop(0))
  
          for part in module_parts:
              path = path / part
  
          return find_extensions_in(path)
  
      if name == '~':
          return list(bot.extensions.keys())
  
      return [name]
docs: Tries to resolve extension queries into a list of extension names.