Skip to content

Commit

Permalink
style: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hms5232 committed Feb 4, 2024
1 parent a2dab15 commit 3b0dbe3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
use std::env;
use dotenvy::dotenv;
use frankenstein::{Api, SendMessageParams, TelegramApi};
use local_ip_address::local_ip;
use std::env;

fn main() {
// If .env file exists, load into environment variable.
dotenv().ok();
// get config
let token_binding = env::var("TOKEN").expect("TOKEN not set");
let token = token_binding.as_str();
let notify_user_id: i64 = env::var("NOTIFY_USER_ID").expect("NOTIFY_USER_ID not set").parse::<i64>().expect("NOTIFY_USER_ID type is wrong.");
let notify_user_id: i64 = env::var("NOTIFY_USER_ID")
.expect("NOTIFY_USER_ID not set")
.parse::<i64>()
.expect("NOTIFY_USER_ID type is wrong.");

// make a message
let message = SendMessageParams::builder()
Expand Down

0 comments on commit 3b0dbe3

Please sign in to comment.