mirror of
https://github.com/Technicolor-creamsicle/Osselbot.git
synced 2024-09-30 06:46:13 -04:00
added .env file
This commit is contained in:
parent
640e0e475c
commit
5c315db8c6
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
.env
|
||||
# Added by cargo
|
||||
|
||||
/target
|
||||
|
7
Cargo.lock
generated
7
Cargo.lock
generated
@ -4,6 +4,7 @@
|
||||
name = "Osselbot"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dotenv",
|
||||
"serenity",
|
||||
"tokio",
|
||||
]
|
||||
@ -151,6 +152,12 @@ dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dotenv"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
|
||||
|
||||
[[package]]
|
||||
name = "encoding_rs"
|
||||
version = "0.8.28"
|
||||
|
@ -9,4 +9,5 @@ edition = "2018"
|
||||
[dependencies]
|
||||
serenity = { version = "0.10.8", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] }
|
||||
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
|
||||
dotenv = "0.15.0"
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#![allow(non_snake_case)] //Osselbot doesn't follow snake case so we need this
|
||||
|
||||
use dotenv::dotenv;
|
||||
use std::env;
|
||||
|
||||
use serenity::{
|
||||
@ -42,6 +43,7 @@ impl EventHandler for Handler {
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
dotenv().ok();
|
||||
// Configure the client with your Discord bot token in the environment.
|
||||
let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user