UrielCh / midjourney-client

midjourney-client in deno
MIT License
55 stars 11 forks source link

new Midjourney(DISCORD_TOKEN) fails #27

Open madc0w opened 1 year ago

madc0w commented 1 year ago

According to docs: new Midjourney(SALAI_TOKEN) directly provide SALAI_TOKEN

in this case a 72 char long SALAI_TOKEN token should be pass to the Midjourney constructor like: new Midjourney(SALAI_TOKEN)

https://www.npmjs.com/package/midjourney-discord-api#new-midjourneysalai_token-directly-provide-salai_token

Since this constructor is indistinguishable from the one that take a filename (also a string), the result is predictable:

NotFound [Error]: ENOENT: no such file or directory, open ''

UrielCh commented 1 year ago

if the string you pass to the constructor do not match a midjourney SALAI_TOKEN sytax, it will be use as a path, if not it will be test as a path or use as a SALAI_TOKEN.

UrielCh commented 1 year ago

if you get the error ENOENT: no such file or directory, open '<SALAI_TOKEN>' you forgot to replace SALAI_TOKEN by it's acual value.