erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.71k stars 286 forks source link

Failed to get application_commands for command settings #211

Open webpon opened 1 year ago

webpon commented 1 year ago

the code that reproduces this issue or a replay of the bug

await client.connect()报Failed to get application_commands for command settings

Describe the bug

await client.connect()报Failed to get application_commands for command settings

error log

await client.connect()报Failed to get application_commands for command settings

webpon commented 1 year ago

no

webpon commented 1 year ago

1

webpon commented 1 year ago

机器人被移除了,不是包的问题

fdchiu commented 1 year ago

Still having this problem: Failed to get application_commands for command settings @webpon: did you find solution yet?

James-Dunn commented 1 year ago

This means the SALAI_TOKEN is invalid. Get a new one and try again.

louisbrent1992 commented 1 year ago

Try adding this to environment variable:

HUGGINGFACE_TOKEN="verify human https://huggingface.co/docs/hub/security-tokens"

sabisin commented 1 year ago

There might be a problem with Number.MAX_SAFE_INTEGER in your JavaScript environment, especially when dealing with long channel ID integers like those in Discord. You can find more information about Number.MAX_SAFE_INTEGER here: link.

To address this issue, consider treating these long integers as strings in your environment for stricter handling.

mattmcegg commented 1 year ago

There might be a problem with Number.MAX_SAFE_INTEGER in your JavaScript environment, especially when dealing with long channel ID integers like those in Discord. You can find more information about Number.MAX_SAFE_INTEGER here: link.

To address this issue, consider treating these long integers as strings in your environment for stricter handling.

I am seeing this same error as well. I dont think it has anything to do with integers, since even if i set the discord channel and server as strings directly in the client function, it still doesnt work:

const client = new Midjourney({
      ServerId: '123123123123123123123' as string,
      ChannelId: '123123123123123123123' as string,
      SalaiToken:
        'MTcyN...' as string,
      Debug: true,
      Ws: true,
    });
msnmask commented 1 year ago

Try adding this to environment variable:

HUGGINGFACE_TOKEN="verify human https://huggingface.co/docs/hub/security-tokens"

exact this ?or what should i do ?

msnmask commented 1 year ago

ok ...so i found out .so the Midjourney Entity ,doesnt requires your bot token at all . it doesnt . look carefully. the description says it requires DISCORD_TOKEN as your SalaiToken,nor your BOT_TOKEN... please note this . and https://www.androidauthority.com/get-discord-token-3149920/ the link : how to get your discord token .

msnmask commented 1 year ago

the problem is this . i asked in the discord -> discordjs channel about what is a discord-token ,and a kind gentleman said that its the bot token .so i when for the bot token .

NatalieM11 commented 9 months ago

try this fix. it's working for me - https://github.com/erictik/midjourney-api/pull/256/files