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

variable shadowing, incorrect delete

Open DmitryGolovin-azur opened this issue 7 months ago • 1 comments

Hi. I noticed a problem, when I run sequence V1 -> U1 (on new picture) with websocket. I don't see results.

I found the problem here: messageCreate -> done -> filterMessages -> getEventByContent. getEventByContent works wrong because waitMjEvents contains old values. I also found the cause of this inconsistence (variable shadowing):

https://github.com/erictik/midjourney-api/blob/1346be21baa852938e5eaed4329bf72f2c45e8aa/src/discord.ws.ts#L655

https://github.com/erictik/midjourney-api/blob/1346be21baa852938e5eaed4329bf72f2c45e8aa/src/discord.ws.ts#L635 https://github.com/erictik/midjourney-api/blob/1346be21baa852938e5eaed4329bf72f2c45e8aa/src/discord.ws.ts#L640

DmitryGolovin-azur avatar Jul 01 '24 13:07 DmitryGolovin-azur