Adding metric support

This commit is contained in:
claude Bot committed 2023-10-21 21:33:50 +01:00
1 parent 6cfdc10a6a
commit 6615e05196
6 files changed
+40 -4

No files matched your search

+5
View File
@@ -5,6 +5,8 @@ use poise::serenity_prelude::{
ReactionType,
};
#[cfg(feature = "prometheus")]
use crate::metrics::PLAY_COUNTER;
use crate::{
cmds::autocomplete_sound,
models::{guild_data::CtxGuildData, sound::SoundCtx},
@@ -27,6 +29,9 @@ pub async fn play(
let guild = ctx.guild().unwrap();
#[cfg(feature = "prometheus")]
PLAY_COUNTER.inc();
ctx.say(
play_from_query(
&ctx.serenity_context(),