mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
Make file resolving non-blocking for local paths
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -195,7 +195,12 @@ class ClientDataResolver {
|
|||||||
return reject(new Error(`The file could not be found: ${file}`));
|
return reject(new Error(`The file could not be found: ${file}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
return resolve(fs.readFileSync(file));
|
fs.readFile(file, (err, data) => {
|
||||||
|
if (err) {
|
||||||
|
return reject(err);
|
||||||
|
}
|
||||||
|
resolve(data);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user