text: const redis = require('./RedisDb.js').client
  const Command = require('./Command.js').Command
  class Commands {
      constructor(objectNs) {
          this.objectNs = objectNs
      }
      ns() {
          return this.objectNs + ":" + "commands"
      }
      get(id) {
          return redis.async.hget(this.ns()+":command:"+id)
      }
      add(id,name, description) {
          const command  = new Command(id)
          return command.create({name, description})       
      }
      update(id,name, description) {
          const command  = new Command(id)
          return command.update({name, description})       
      }
      delete(id) {
          const command  = new Command(id)
          return command.delete()  
      }
      async list() {
          const self = this
          const commands = await redis.smembers(this.ns()+":list")
          return commands.map(async (command) => {
              return await redis.hgetall(self.ns()+":command:"+command)
          })
      }
  }
  
  module.exports.commands = new Commands();