This commit is contained in:
Dragon Fire
2021-02-20 09:48:49 -05:00
parent b50a1a4ebe
commit a97baaa57d
+4 -4
View File
@@ -54,11 +54,11 @@ module.exports = class XiaoClient extends CommandoClient {
this.leaveMessages = leaveMsgs; this.leaveMessages = leaveMsgs;
} }
async registerFontsIn(path) { async registerFontsIn(filepath) {
const files = fs.readdirSync(path); const files = fs.readdirSync(filepath);
for (const file of files) { for (const file of files) {
const metadata = await fontFinder.get(path.join(path, file)); const metadata = await fontFinder.get(path.join(filepath, file));
const font = new Font(path.join(path, file), file, metadata); const font = new Font(path.join(filepath, file), file, metadata);
this.fonts.set(file, font); this.fonts.set(file, font);
font.register(); font.register();
} }