Skip to content

Commit

Permalink
make it more obvious the bot is doing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tazz4843 committed Feb 27, 2024
1 parent f95f594 commit cc55d14
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripty_audio_handler/src/audio_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ impl EventHandler for AudioHandler {
self.verbose.clone(),
self.context.clone(),
Arc::clone(&self.webhook),
self.channel_id,
self.thread_id,
self.transcript_results.clone(),
Arc::clone(&self.automod_server_cfg),
Expand Down
7 changes: 7 additions & 0 deletions scripty_audio_handler/src/events/voice_tick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub async fn voice_tick(
verbose: Arc<AtomicBool>,
ctx: Context,
webhook: Arc<Webhook>,
channel_id: ChannelId,
thread_id: Option<ChannelId>,
transcript_results: Option<Arc<RwLock<Vec<String>>>>,
automod_server_cfg: Arc<AutomodServerConfig>,
Expand Down Expand Up @@ -64,6 +65,7 @@ pub async fn voice_tick(
language: Arc::clone(&language),
verbose: Arc::clone(&verbose),
guild_id,
channel_id,
thread_id,
automod_server_cfg: Arc::clone(&automod_server_cfg),
transcript_results: transcript_results.clone(),
Expand Down Expand Up @@ -98,6 +100,7 @@ struct SilentSpeakersContext {
language: Arc<RwLock<String>>,
verbose: Arc<AtomicBool>,
guild_id: GuildId,
channel_id: ChannelId,
thread_id: Option<ChannelId>,
automod_server_cfg: Arc<AutomodServerConfig>,
transcript_results: TranscriptResults,
Expand All @@ -116,6 +119,7 @@ async fn handle_silent_speakers<'a>(
language,
verbose,
guild_id,
channel_id,
thread_id,
automod_server_cfg,
transcript_results,
Expand Down Expand Up @@ -152,6 +156,7 @@ async fn handle_silent_speakers<'a>(

// finalize the stream
let lang = language.read().clone();
let _typing = thread_id.unwrap_or(channel_id).start_typing(&ctx.http);
let (mut final_result, hook) = match finalize_stream(
old_stream,
ssrc_state.ssrc_user_data_map.clone(),
Expand Down Expand Up @@ -245,6 +250,8 @@ async fn handle_silent_speakers<'a>(

hooks.push((hook, ssrc));

drop(_typing);

if kiai_enabled.load(Ordering::Relaxed) {
let Some(user_id) = ssrc_state
.ssrc_user_id_map
Expand Down
1 change: 1 addition & 0 deletions scripty_bot_utils/src/handler/normal/ratelimit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub async fn ratelimit(
method,
path,
global,
..
}: &RatelimitInfo,
) {
let method = method.reqwest_method();
Expand Down

0 comments on commit cc55d14

Please sign in to comment.