Read bot token from config
This commit is contained in:
parent
9bb93a8a51
commit
c51beb2bda
|
@ -66,9 +66,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||||
let mastodon = registration.create_access_token(token)?;
|
let mastodon = registration.create_access_token(token)?;
|
||||||
let publisher = MastodonPublisher::new(mastodon);
|
let publisher = MastodonPublisher::new(mastodon);
|
||||||
|
|
||||||
let api = Arc::new(Api::new(
|
let api = Arc::new(Api::new(cfg.bot_token.clone()));
|
||||||
std::env::var("TELEGRAM_BOT_KEY").expect("bot key not present"),
|
|
||||||
));
|
|
||||||
|
|
||||||
let chat = get_chat_ref(api.clone(), None)
|
let chat = get_chat_ref(api.clone(), None)
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Reference in New Issue