problem in recalling a command plugin in a script

● ARCHIVED · READ-ONLY
Started by JesusGames 2 posts View original ↗
  1. ho un problema con l'inserimento di un comando plugin in una diramazione condizionale.
    I've got a problem with the insertion of a command plugin in a condictional branch.

    The commnad in the plugin is this:
    Code:
    const fs = require ('fs')
    
    function containsPassword (path, password) {
      let result = false
      try {
        fs.readFile(path, 'utf8', (data) => {
          result = data.includes(password)
        })
      } catch (error) {
        throw new Error(error)
      }
      return result
    };
  2. [mod]Closing this as it is a duplicate thread.[/mod]