midjourney-api
midjourney-api copied to clipboard
Initializing a client fails
the code that reproduces this issue or a replay of the bug
const DISCORD_SERVER_ID = 1133306614422708234;
const DISCORD_CHANNEL_ID = 1133306615282548788;
const DISCORD_TOKEN = "<TOKEN>";
let { Midjourney } = require("midjourney");
let client = new Midjourney({
ServerId: DISCORD_SERVER_ID,
ChannelId: DISCORD_CHANNEL_ID,
SalaiToken: DISCORD_TOKEN,
Debug: true,
});
await client.init();
Describe the bug
Describe the bug
Following the README in this repo. Created a server and invited Midjourney bot to it. Assigned DISCORD_SERVER_ID
, DISCORD_CHANNEL_ID
, DISCORD_TOKEN
variables and tried to call await client.init()
.
Expected behavior Client initialization should be successful.
error log
Uncaught Error: Failed to get application_commands for command settings
at MidjourneyApi.getCommand (/Users/alex/Projects/assistant/node_modules/midjourney/libs/command.js:82:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Midjourney.Connect (/Users/alex/Projects/assistant/node_modules/midjourney/libs/midjourney.js:32:13)
at async Midjourney.init (/Users/alex/Projects/assistant/node_modules/midjourney/libs/midjourney.js:44:9)
at async REPL12:1:33
got the same error here when using imagine api - api is very unusable now. Hopefully we can escalate this issue thanks!
got the same error
Experiencing the same error.
found the reason - likely salai token is invalid. Try using a new salai token
Becareful guys, ServerId
and ChannelId
should be passed as string or they will be automatically rounded down by JS.
@bingyuyap Good call!
I encountered the same error. Despite logging out and back into Discord, and updating the Discord token, the issue persists without any success.
same error here
try this fix. it's working for me - https://github.com/erictik/midjourney-api/pull/256/files