erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.69k stars 283 forks source link

Multiple Imagine with Websocket #249

Open morganfuchs opened 10 months ago

morganfuchs commented 10 months ago

Hello, how does the websocket mode work? I have the impression that as soon as I send the same description several times, it doesn't work properly.

I'm looking for a solution for ephemeral or deleted messages and it seems to me that websockets are the solution.

stricklandye commented 9 months ago

There is not difference between using user token or robot token to establish websocket connection with discord server. If you want to collect ephemeral messages, here is the snippet (It's GO code but the principle is same.)

// just replace token with your user token
sess, err := discordgo.New(token)

If you do not understand,feel free to ask further. I have stucked with same issue monthes ago and no one helps. So I am glad to help others out.