erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.65k stars 271 forks source link

Failed to get application_commands for command settings #211

Open webpon opened 11 months ago

webpon commented 11 months 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 11 months ago

no

webpon commented 11 months ago

1

webpon commented 11 months ago

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

fdchiu commented 10 months ago

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

James-Dunn commented 10 months ago

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

louisbrent1992 commented 10 months ago

Try adding this to environment variable:

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

sabisin commented 10 months 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 10 months 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 8 months 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 8 months 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 8 months 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 4 months ago

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