Skip to content

Commit

Permalink
fix: don't count messages from bots
Browse files Browse the repository at this point in the history
  • Loading branch information
lajp committed Jan 2, 2024
1 parent 4eec63c commit e85fe92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ impl EventHandler for Handler {
}

if let Some(gid) = msg.guild_id {
if gid == env::var("GUILD_ID").unwrap().parse::<u64>().unwrap() {
if gid == env::var("GUILD_ID").unwrap().parse::<u64>().unwrap() && !msg.author.bot {
if let Ok(Channel::Guild(c)) = msg.channel(&ctx.http).await {
match c.kind {
ChannelType::PrivateThread => {}
Expand Down

0 comments on commit e85fe92

Please sign in to comment.