Skip to content

Commit

Permalink
fix bug with autostar channels in forums
Browse files Browse the repository at this point in the history
  • Loading branch information
CircuitSacul committed Jun 30, 2023
1 parent 066b50b commit a367739
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/events/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::sync::Arc;
use std::{sync::Arc, time::Duration};

use twilight_gateway::{Event, ShardId};

Expand Down Expand Up @@ -52,6 +52,11 @@ async fn match_events(
return Ok(());
};

// the initial message doesn't exist right away, so we need
// to wait a few seconds. Otherwise, the message won't
// receive its reaction.
tokio::time::sleep(Duration::from_secs(2)).await;

if bot.cache.is_channel_forum(guild_id, parent_id) {
core::autostar::handle(
&bot,
Expand Down

0 comments on commit a367739

Please sign in to comment.