24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
task::block_on(async {
let mut reply_to: Option<telegram_bot::UserId>;
loop {
reply_to = None;
match stream.next().await {
Some(update) => {
if let Err(err) = handle(update?, &core, &reply_to).await {
core.send(&format!("🛑 {:?}", err), reply_to, None).await?;
};
},
None => {
core.send("🛑 None error.", None, None).await?;
}
};
}
|
|
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
task::block_on(async {
let mut reply_to: Option<telegram_bot::UserId>;
loop {
reply_to = None;
match stream.next().await {
Some(update) => {
if let Err(err) = handle(update?, &core, &reply_to).await {
core.send(&format!("🛑 {err:?}"), reply_to, None).await?;
};
},
None => {
core.send("🛑 None error.", None, None).await?;
}
};
}
|