score:1

Accepted answer

you must provide an image url so instead of your current fetch where you try to get the image you have to provide the quickchart link like so:

let com = `https://quickchart.io/chart?chart={
                type: 'line',
                data: {
                  labels: ['q1', 'q2', 'q3', 'q4'],
                  datasets: [{
                    label: 'revenue',
                    data: [100, 200, 300, 400],fill:false
                  }]
                }
              }&backgroundcolor=transparent&width=500&height=300&devicepixelratio=1.0&format=png&version=2.9.3`

if (message) {
  // rest of code
}

Related Query

More Query from same tag