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;
28da2e2a00 2022-03-12 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;
28da2e2a00 2022-03-12 15:
1c444d34ff 2024-08-28 16: #[async_std::main]
1c444d34ff 2024-08-28 17: async fn main() -> Result<()> {
28da2e2a00 2022-03-12 18: let settings = config::Config::builder()
28da2e2a00 2022-03-12 19: .add_source(config::File::with_name("rsstg"))
44575a91d3 2025-07-09 20: .build()
44575a91d3 2025-07-09 21: .stack()?;
e624ef9d66 2025-04-20 22:
44575a91d3 2025-07-09 23: let core = core::Core::new(settings).await.stack()?;
e624ef9d66 2025-04-20 24:
bb89b6fab8 2025-06-15 25: LongPoll::new(core.tg.clone(), core).run().await;
61df933942 2020-11-18 26:
61df933942 2020-11-18 27: Ok(())
61df933942 2020-11-18 28: }