From c96ce141acc2591e52118daca33511b58873c2a7 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Tue, 6 Aug 2024 02:26:50 +0200 Subject: [PATCH] Enable telegram notification --- src/twitch_handler/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/twitch_handler/mod.rs b/src/twitch_handler/mod.rs index 05f3786..3bccc7d 100644 --- a/src/twitch_handler/mod.rs +++ b/src/twitch_handler/mod.rs @@ -7,7 +7,7 @@ use futures::StreamExt; use async_trait::async_trait; use auth::Token; -use crate::{config, notifiers::discord::send_to_discord}; +use crate::{config, notifiers::{discord::send_to_discord, telegram::send_to_telegram}}; pub struct TokenStorage { @@ -51,14 +51,14 @@ pub async fn notify_game_change(title: String, _old_game: String, new_game: Stri let msg = format!("HafMC сменил игру на {} ({})! \nПрисоединяйся: https://twitch.tv/hafmc", new_game, title); send_to_discord(&msg).await; - // send_to_telegram(&msg).await; + send_to_telegram(&msg).await; } pub async fn notify_stream_online(title: String, game: String) { let msg = format!("HafMC сейчас стримит {} ({})! \nПрисоединяйся: https://twitch.tv/hafmc", title, game); send_to_discord(&msg).await; - // send_to_telegram(&msg).await; + send_to_telegram(&msg).await; }