add env config
This commit is contained in:
parent
88395e0b40
commit
30fe746bfd
@ -1,4 +1,11 @@
|
||||
use teloxide::prelude::*;
|
||||
use envconfig::Envconfig;
|
||||
|
||||
#[derive(Envconfig)]
|
||||
struct Config {
|
||||
#[envconfig(from = "BOT_TOKEN")]
|
||||
pub bot_token: String,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>>{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user