Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chartEnabled=trueでfont.ttfが配置されていない場合は起動しないようにする #110

Open
massongit opened this issue Mar 18, 2023 · 0 comments

Comments

@massongit
Copy link
Contributor

massongit commented Mar 18, 2023

23:46:19 [AiOS]: [chart]: Chart rendering...
/ai/node_modules/canvas/index.js:48
  return Canvas._registerFont(fs.realpathSync(src), fontFace)
                ^

Error: Could not parse font file
    at Object.registerFont (/ai/node_modules/canvas/index.js:48:17)
    at Object.renderChart (/ai/built/modules/chart/render-chart.js:25:14)
    at default_1.genChart (/ai/built/modules/chart/index.js:119:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async default_1.post (/ai/built/modules/chart/index.js:40:22)

font.ttf を配置せずに chartEnabled: true な状態で起動すると、チャート機能実行時に上記エラーで落ちます。
従って、bot起動前に上記の状態になっていないかをチェックし、なっている場合は起動しないようにすると良いかと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant