Discord bot can't send images

#1

My discord bot runs, but images cannot upload.
Error with Event “Send File”, Action #5:
Error: ENOENT: no such file or directory, stat ‘/app/resources/163.png’
It can’t find the images to send, yet the images are defined in the project. Any help?

#2

well first sendfile is DEPRECATED
try this

channel.send({
  files: [{
    attachment: './resources/163.png',
    name: 'file.png'
  }]
})

if your image is an asset go to assets copy the url and do this

channel.send({
  files: ['https://cdn.hyperdev.com/click-me.svg?1477239469954']
})```