Wildric-Auric / MidJourney-Wrapper

MidJourney wrapper in Discord.
Creative Commons Zero v1.0 Universal
698 stars 149 forks source link

Error 401 #29

Closed DevMarkosM closed 1 year ago

DevMarkosM commented 1 year ago

Hi i think its need update again , i have same issue error 401 after update ^^ thank you :)

Wildric-Auric commented 1 year ago

I've just tested, and it works well. Double check your tokens.

DevMarkosM commented 1 year ago

idk what is wrong with me :/ but my tokens should work

Wildric-Auric commented 1 year ago

Well, when do you get the error? Does the bot (DaVinci) connect? Do /hello command work? I need more info to help...

DevMarkosM commented 1 year ago

i get this error when i try to generate image Request has failed; please try later and in the console with print -> response.status_code, when i print -> response.txt , i get nil value no exist , yes the /hello working fine , config picture : https://i.imgur.com/hGA45o3.png

Wildric-Auric commented 1 year ago

"Nil value"? Can I see the output of response.text?

DevMarkosM commented 1 year ago

yes sure ^^ https://i.imgur.com/e5B78iO.png

Wildric-Auric commented 1 year ago

It's response.text not txt...

DevMarkosM commented 1 year ago

oh okay sry its because in your code its written .txt now i get this : https://i.imgur.com/nP5X9SD.png ^^

Wildric-Auric commented 1 year ago

401 means that The Authorization header was missing or invalid. which means that there is a problem with the token. If it used to work before, you would want to check if your account token has changed.

DevMarkosM commented 1 year ago

hmm okay thank you i will check :)

DevMarkosM commented 1 year ago

i have tried to change my tokens but nothing :/ idk

Wildric-Auric commented 1 year ago

okay I see. I don't know why for now... Just to be sure, how do you get your "Salai" token?

DevMarkosM commented 1 year ago

Oh i think i see , Salai token its the discord account token and not the midjourney api ? Because i have see in your code you login with this token bruh my bad x) , i have put api instead the token … sry for distrub you and thank you

Wildric-Auric commented 1 year ago

I said it in the readme but maybe it's not clear enough you're the second person to make this mistake, I will maybe give better precision in the readme. You're welcome.

Wildric-Auric commented 1 year ago

@soniked I noticed a while ago that on linux it does this, try updating Pycord (take a look at this by the way), if the problem persists it is not a big issue for now since it has no repercussion of the functionning of the program.

Wildric-Auric commented 1 year ago

Yes it is forbidden. But as long as you don't spam servers and messages it should be fine I think. Till now, no case of account blocking was reported.