diff --git a/src/command.ts b/src/command.ts index 89b08b9..4c4af41 100644 --- a/src/command.ts +++ b/src/command.ts @@ -48,8 +48,7 @@ export class Command { type: "1", include_applications: "true", }); - const url = `${this.config.DiscordBaseUrl}/api/v9/channels/${this.config.ChannelId}/application-commands/search?${searchParams}`; - + const url = `${this.config.DiscordBaseUrl}/api/v9/guilds/${this.config.ServerId}/application-command-index`; const response = await this.config.fetch(url, { headers: { authorization: this.config.SalaiToken }, }); diff --git a/src/midjourney.ts b/src/midjourney.ts index e3fb4e6..2af0584 100644 --- a/src/midjourney.ts +++ b/src/midjourney.ts @@ -35,12 +35,6 @@ export class Midjourney extends MidjourneyMessage { if (!this.config.Ws) { return this; } - //if auth failed, will throw error - if (this.config.ServerId) { - await this.MJApi.getCommand("settings"); - } else { - await this.MJApi.allCommand(); - } if (this.wsClient) return this; this.wsClient = new WsMessage(this.config, this.MJApi); await this.wsClient.onceReady();