midjourney-discord-api-php icon indicating copy to clipboard operation
midjourney-discord-api-php copied to clipboard

started getting an error

Open myindexlike opened this issue 1 year ago • 6 comments

"{"data": ["\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442."]}"

{"data": ["Команда больше не действительна. Повторите попытку через пару минут."]}

myindexlike avatar Oct 25 '23 23:10 myindexlike

the same error

tanghengzhi avatar Oct 26 '23 08:10 tanghengzhi

@tanghengzhi @myindexlike Did you find solution for this problem?

BA7YA avatar Oct 26 '23 12:10 BA7YA

batdan/midjourney-api-php

myindexlike avatar Oct 26 '23 12:10 myindexlike

I found the problem. It's related to dataVersion variable. That was changed. You can use following code to get current version without hardcode

$response = self::$client->get('applications/' . self::APPLICATION_ID . '/commands');
        $body = $response->getBody()->getContents();
        $json = json_decode($body, true);

        $this->data_id       = $json[0]['id'];
        $this->data_version  = $json[0]['version'];

BA7YA avatar Oct 26 '23 13:10 BA7YA

the same error

mamislimen avatar Nov 16 '23 16:11 mamislimen

This lib is dead and can not be used anymore. The answer about the data_version is correct but author made this lib in the way that gives you zero chanse to fix it. Because the version is defigned by a private constant and you can not modify it by any trick. Only by hardcode directly in the vendor folder. That means you can't normally use it and need or fork or rewrite the same from scratch.

andriiinoxtech avatar Mar 20 '24 10:03 andriiinoxtech