ferranfg / midjourney-discord-api-php

Generate images using Midjourney Bot through the Discord API.
https://ferranfigueredo.com
MIT License
135 stars 35 forks source link

Not working in php #12

Closed Visioweb closed 1 year ago

Visioweb commented 1 year ago

if I launch the script with discord open, on discord bot I see the generated images, while the script continues to run until it times out. How do I get the image returned inside the php script?

ferranfg commented 1 year ago

The complete generation takes about 1 minute to complete. If your timeout limit is lower than that, the script will be finished before completing the process. The response will be an object with the URL of the generated image.

Visioweb commented 1 year ago

My timeout limit is 6000, but the process continues to run despite the images being generated on discord. It never stops until it times out and returns nothing to me.

ferranfg commented 1 year ago

Ok, a few questions about Discord:

CleanShot 2023-04-25 at 15 34 47

Visioweb commented 1 year ago

when i launch the script, after few minutes in discord bot show this message: A cascade of butterfly in a fantastic world --v 5 --v 5 - @Francesco Ingrosso (Waiting to start)

ferranfg commented 1 year ago

Yes, but when the imagine stage ends, what does the message says?

Visioweb commented 1 year ago

Screenshot_2023-04-25-20-54-29-89_572064f74bd5f9fa804b05334aa4f912

ferranfg commented 1 year ago

Thanks! The MJ bot replies with different messages and I hadn't seen this.

I will release a new version to address this issue. In the meantime, you can try to edit this line: https://github.com/ferranfg/midjourney-discord-api-php/blob/main/src/Midjourney.php#L112

Visioweb commented 1 year ago

replace it with what?

shashwatgokhe commented 1 year ago

Thanks! The MJ bot replies with different messages and I hadn't seen this.

I will release a new version to address this issue. In the meantime, you can try to edit this line: https://github.com/ferranfg/midjourney-discord-api-php/blob/main/src/Midjourney.php#L112

I think the button hashes have been changed in the midjourney bot, may be sir you can update the get upscale part of your code.

ferranfg commented 1 year ago

I've released a new version (2.0), which should address this issue.