DiscordPHP: sendFile not working

$message->channel->sendFile( __DIR__ . "/media/test.jpg", "test.jpg", "testContent");

So, the file won’t let me rename it after running this. Says the file is OPEN with PHP, but the thing is: it doesn’t send. When the file doesn’t even exist, it sends an empty, 0kb file of name “test.jpg” and echos an error to my prompt, but when the file exists, it does nothing. At all. It doesn’t write an error to my prompt, but it also doesn’t send the file; it’s as if it succeeded in sending it, but it didn’t. And it STILL responds afterward, so it’s not hanging. It just opens the file, does nothing with it, and then continues.

Is there a different way I’m supposed to do this?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (7 by maintainers)

Commits related to this issue

Most upvoted comments

It’s working! You’re a genius ❤️