import registry from 'registry'; export default class Avatar { #location = null; #session = null; constructor(session){ this.#session = session; } async initialize(){ this.#location = registry.universe.location('home'); } get location(){ // console.log(`Returning ${this.#location}`) return this.#location; } set location(name){ if(typeof name !== 'string') { throw new Error('Assignment to Avatar.location must be a string.'); } // using the name, find a location and store the resulting object inside avatar this.#location = registry.universe.location(name); } async command(text){ const session = this.#session; await registry.commands.input({session, text}) } async completions(){ //console.log(await registry.commands.completions()) return await registry.commands.completions(); } }