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

Failed to get application_commands for command settings

Open webpon opened this issue 2 years ago • 12 comments
trafficstars

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 avatar Aug 09 '23 00:08 webpon

no

webpon avatar Aug 09 '23 04:08 webpon

1

webpon avatar Aug 09 '23 04:08 webpon

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

webpon avatar Aug 09 '23 04:08 webpon

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

fdchiu avatar Aug 26 '23 16:08 fdchiu

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

James-Dunn avatar Sep 13 '23 03:09 James-Dunn

Try adding this to environment variable:

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

louisbrent1992 avatar Sep 13 '23 22:09 louisbrent1992

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.

sabisin avatar Sep 18 '23 17:09 sabisin

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,
    });

mattmcegg avatar Sep 18 '23 17:09 mattmcegg

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 avatar Oct 23 '23 02:10 msnmask

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 avatar Oct 23 '23 03:10 msnmask

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 .

msnmask avatar Oct 23 '23 03:10 msnmask

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

NatalieM11 avatar Feb 23 '24 14:02 NatalieM11