Closed Visioweb closed 1 year ago
Try to var_dump($response) here: https://github.com/ferranfg/midjourney-discord-api-php/blob/main/src/Midjourney.php#L124
This should return a list of all the recent messages on your discord channel. Then, if your prompt is "A cyberpunk cat --v 4", you should see a message with content similar to:
"content": "**A cyberpunk cat --v 4** - <@8892XXX7391744> (fast)"
The number should be your user id.
Could you share your original prompt and what those "content" properties look like?
a prompt is "A cat riding a horse --v 5" and the output of var_dump($response) is here https://pastebin.com/3CeVSYga
Got it.
The content on your pastebin looks like **A cat riding a horse --v 5 --v 5.1** - <@798961412427743292> (fast)
so there is an extra --v 5.1
. I undersan if you run the /settings
MJ command, you will see: "Current suffix: --v 5.1".
To get this library running, try to change your settings so your current suffix is empty and add the "--v 5.1" to your prompt instead.
I did as you say and, on the browser it tells me: The page doesn't work, while on the plesk logs it tells me AH01071: Got error 'PHP message: PHP Warning: Undefined array key 0 in /var/www/vhosts/sitomio.it/httpdocs/midbot/src/Midjourney.php on line 154; PHP message: PHP Warning: Attempt to read property "components" on null in /var/www/vhosts/sitomio.it/httpdocs/midbot/src/Midjourney.php on line 154;
Could you var_dump this $message variable?
https://github.com/ferranfg/midjourney-discord-api-php/blob/main/src/Midjourney.php#L137
How i resolve It?
Try with 2.0.1 version and let me know
YEAH, now working finally.. Thanks
Great!
I already wrote previously, but the ticket was closed saying that the problem had been solved by updating the entire repository. Now I downloaded everything again, even remotely, and it gives me the exact same problem (the image on discord is generated, but the php script keeps running indefinitely even if I launch demo.php, obviously inserting the id and token. If I put a var_dump($raw_message); die() I get NULL in line 126 of the src/Midjourney.php file the same as it happened before. Why? Could it be that to use the script I have to have a pro subscription? I have the basic one, could it be due to this?