erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.64k stars 269 forks source link

[fix] Failed to get application_commands for command settings issue #255 #256

Closed deniska83 closed 4 months ago

deniska83 commented 4 months ago

This is a provisional workaround for issue #255 Kudos to freezer71 for their remarkable contribution to the community by identifying and addressing this challenge. The interim solution is now available as an npm package, aptly named freezer-midjourney-api

morganfuchs commented 4 months ago

Missing change here : async getCommand(name: CommandName) { const searchParams = new URLSearchParams({ type: "1", query: name, limit: "1", include_applications: "true", // command_ids:${this.config.BotId}, }); const url =${this.config.DiscordBaseUrl}/api/v9/channels/${this.config.ChannelId}/application-commands/search?${searchParams}; const response = await this.config.fetch(url, { headers: { authorization: this.config.SalaiToken }, });

fberbert commented 4 months ago

Nice job! You saved my day. I hope the maintainer approves this pull request. The last time this project was updated was 7 months ago.