midjourney-api
midjourney-api copied to clipboard
client.init() doesn't execute
the code that reproduces this issue or a replay of the bug
ServerId: <string>process.env.SERVER_ID,
ChannelId: <string>process.env.CHANNEL_ID,
SalaiToken: <string>process.env.SALAI_TOKEN,
HuggingFaceToken: <string>process.env.HUGGINGFACE_TOKEN,
Debug: true,
Ws: true,
});
await client.Connect();
const Imagine = await client.Imagine(
"Red hamster smoking a cigaret, https://media.discordapp.net/attachments/1108515696385720410/1118385339732590682/DanielH_A_giant_hamster_monster._Friendly_in_a_business_suit_si_d4be1836-a4e1-41a8-b1d7-99eebc521220.png?width=1878&height=1878 ",
(uri: string, progress: string) => {
console.log("Imagine.loading", uri, "progress", progress);
}
);```
this part of code gets stuck at `await client.Connect()` and doesn't execute anything at all. It was fine earlier today but somehow stopped working
### Describe the bug
**Describe the bug**

**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
### error log
no errors, when debu is true just stuck at open.time 0 2023-06-20T07:12:15.737Z
check SALAI_TOKEN
https://github.com/erictik/midjourney-client/blob/main/example/imagine.ts
@zcpua SALAI_TOKEN was correct all along, I wonder if there was a rate limit from connecting too many clients without closing the client. I had to refresh my salai tokens to work