Skip to content

Commit

Permalink
remove renamed channels from response
Browse files Browse the repository at this point in the history
  • Loading branch information
wagpa committed Jan 11, 2025
1 parent ae02c9d commit 361164f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/discord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,13 @@ impl EventHandler for Handler {

// Decrement old if available
if let Some(old) = old {
self.metrics_handler
.channel
.get_or_create(&ChannelLabels {
guild_id: old.guild_id.get(),
channel_id: old.id.get(),
channel_name: old.name.clone(),
channel_nsfw: old.nsfw.into(),
channel_type: old.kind.name().to_string(),
})
.set(0);
self.metrics_handler.channel.remove(&ChannelLabels {
guild_id: old.guild_id.get(),
channel_id: old.id.get(),
channel_name: old.name.clone(),
channel_nsfw: old.nsfw.into(),
channel_type: old.kind.name().to_string(),
});
}

// Increment new
Expand Down

0 comments on commit 361164f

Please sign in to comment.