614456ed35 2025-02-22 1: //! This is telegram bot to fetch RSS/ATOM feeds and post results on public
614456ed35 2025-02-22 2: //! channels
614456ed35 2025-02-22 3:
614456ed35 2025-02-22 4: #![warn(missing_docs)]
614456ed35 2025-02-22 5:
9171c791eb 2021-11-13 6: mod command;
9171c791eb 2021-11-13 7: mod core;
0340541002 2025-04-24 8: mod sql;
1c444d34ff 2024-08-28 9:
44575a91d3 2025-07-09 10: use stacked_errors::{
44575a91d3 2025-07-09 11: Result,
44575a91d3 2025-07-09 12: StackableErr,
44575a91d3 2025-07-09 13: };
bb89b6fab8 2025-06-15 14: use tgbot::handler::LongPoll;
1c444d34ff 2024-08-28 15:
1c444d34ff 2024-08-28 16: #[async_std::main]
1c444d34ff 2024-08-28 17: async fn main() -> Result<()> {
1c444d34ff 2024-08-28 18: let settings = config::Config::builder()
42b29b744b 2026-01-01 19: .set_default("api_gateway", "https://api.telegram.org").stack()?
e624ef9d66 2025-04-20 20: .add_source(config::File::with_name("rsstg"))
44575a91d3 2025-07-09 21: .build()
44575a91d3 2025-07-09 22: .stack()?;
e624ef9d66 2025-04-20 23:
44575a91d3 2025-07-09 24: let core = core::Core::new(settings).await.stack()?;
e624ef9d66 2025-04-20 25:
bb89b6fab8 2025-06-15 26: LongPoll::new(core.tg.clone(), core).run().await;
61df933942 2020-11-18 27:
61df933942 2020-11-18 28: Ok(())
61df933942 2020-11-18 29: }