diff --git a/example/upscale-ws.ts b/example/upscale-ws.ts index 3977e7b..8946f01 100644 --- a/example/upscale-ws.ts +++ b/example/upscale-ws.ts @@ -12,11 +12,16 @@ async function main() { ServerId: process.env.SERVER_ID, ChannelId: process.env.CHANNEL_ID, SalaiToken: process.env.SALAI_TOKEN, - Debug: true, + // Debug: true, Ws: true, }); await client.Connect(); - const Imagine = await client.Imagine("a cool cat, blue ears, yellow hat"); + const Imagine = await client.Imagine( + "a cool cat, blue ears, yellow hat --v 4", + (uri: string, progress: string) => { + console.log("loading", uri, "progress", progress); + } + ); console.log(Imagine); if (!Imagine) { console.log("no message"); diff --git a/src/discord.ws.ts b/src/discord.ws.ts index c156587..5db26c0 100644 --- a/src/discord.ws.ts +++ b/src/discord.ws.ts @@ -229,6 +229,7 @@ export class WsMessage { if (channel_id !== this.config.ChannelId) return; if (author?.id !== this.config.BotId) return; if (interaction && interaction.user.id !== this.UserId) return; + this.log('[messageCreate]', JSON.stringify(message)); this.messageCreate(message); } @@ -237,6 +238,7 @@ export class WsMessage { if (channel_id !== this.config.ChannelId) return; if (author?.id !== this.config.BotId) return; if (interaction && interaction.user.id !== this.UserId) return; + this.log('[messageUpdate]', JSON.stringify(message)); this.messageUpdate(message); }