success and failure toasts; less discord info spam

This commit is contained in:
Brandon Thomas committed 2025-05-07 23:47:30 -04:00
1 parent 83cecad280
commit d91243b1f5
4 files changed
+10 -6

No files matched your search

@@ -1,7 +1,7 @@
use anyhow::anyhow;
use discord_rich_presence::{DiscordIpc, DiscordIpcClient};
use errors::AnyhowResult;
use log::info;
use log::{debug, info};
/// Our Discord App ID. Not sure if this is a secret.
const DISCORD_APP_ID : &str = "1366596912593113138";
@@ -15,13 +15,13 @@ pub async fn discord_presence_thread() -> ! {
}
async fn discord_main_loop(mut client: DiscordIpcClient) -> AnyhowResult<()> {
info!("Connecting Discord IPC client");
info!("(Re)-connecting Discord IPC client...");
client.connect()
.map_err(|err| anyhow!("Error connecting to Discord IPC: {:?}", err))?;
loop {
info!("Notifying discord presence API...");
debug!("Notifying discord presence API...");
let assets = discord_rich_presence::activity::Assets::new()
.large_image("https://storyteller.ai/android-chrome-512x512.png")
+3 -3
View File
@@ -66,8 +66,8 @@ export class Configs {
break;
}
console.debug(`Build environment type: ${environment}`);
console.debug(`Deploy context: ${this.deployContext}`);
console.debug(`Upload API: ${this.uploadApiVideo}`);
//console.debug(`Build environment type: ${environment}`);
//console.debug(`Deploy context: ${this.deployContext}`);
//console.debug(`Upload API: ${this.uploadApiVideo}`);
}
}
@@ -1,6 +1,7 @@
import { SoundRegistry, SoundEffect } from "@storyteller/soundboard";
import { listen } from '@tauri-apps/api/event';
import { AppPreferencesPayload, CustomDirectory, GetAppPreferences, SystemDirectory } from "@storyteller/tauri-api";
import { toast } from "@storyteller/ui-toaster";
type SoraImageGenerationFailed = {
prompt: string,
@@ -18,6 +19,7 @@ export const InstallImageGenerationFailure = () => {
const registry = SoundRegistry.getInstance();
registry.playSound(soundName);
}
toast.error("Image generation failed!");
});
}
@@ -1,6 +1,7 @@
import { SoundRegistry, SoundEffect } from "@storyteller/soundboard";
import { listen } from '@tauri-apps/api/event';
import { AppPreferencesPayload, CustomDirectory, GetAppPreferences, SystemDirectory } from "@storyteller/tauri-api";
import { toast } from "@storyteller/ui-toaster";
type ImageGenerationSuccess = {
media_file_token: string,
@@ -18,6 +19,7 @@ export const InstallImageGenerationSuccess = () => {
const registry = SoundRegistry.getInstance();
registry.playSound(soundName);
}
toast.success("Image generated!");
});
}