mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Fix
This commit is contained in:
@@ -100,6 +100,11 @@ impl TwitchBot {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
client.validate_token().await.unwrap();
|
||||||
|
|
||||||
|
loop {
|
||||||
|
println!("Checking Twitch events...");
|
||||||
let mut eventsub_client = client.connect_eventsub(
|
let mut eventsub_client = client.connect_eventsub(
|
||||||
vec![
|
vec![
|
||||||
("stream.online".to_string(), "1".to_string()),
|
("stream.online".to_string(), "1".to_string()),
|
||||||
@@ -108,15 +113,8 @@ impl TwitchBot {
|
|||||||
],
|
],
|
||||||
config::CONFIG.twitch_channel_id.clone()
|
config::CONFIG.twitch_channel_id.clone()
|
||||||
).await.unwrap();
|
).await.unwrap();
|
||||||
println!("Connected to Twitch EventSub...");
|
|
||||||
|
|
||||||
// let (_chat_client, mut chat_stream) = client.connect_chat(vec!["hafmc".to_string()]).await.unwrap();
|
|
||||||
// println!("Connected to Twitch Chat...");
|
|
||||||
|
|
||||||
client.validate_token().await.unwrap();
|
|
||||||
|
|
||||||
loop {
|
|
||||||
println!("Checking Twitch events...");
|
|
||||||
if let Some(event) = eventsub_client.next().await {
|
if let Some(event) = eventsub_client.next().await {
|
||||||
match event {
|
match event {
|
||||||
eventsub::NotificationType::CustomRewardRedemptionAdd(_) => todo!(),
|
eventsub::NotificationType::CustomRewardRedemptionAdd(_) => todo!(),
|
||||||
|
|||||||
Reference in New Issue
Block a user