midjourney-discord-api-php
midjourney-discord-api-php copied to clipboard
started getting an error
"{"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": ["Команда больше не действительна. Повторите попытку через пару минут."]}
the same error
@tanghengzhi @myindexlike Did you find solution for this problem?
batdan/midjourney-api-php
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'];
the same error
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.