feat: started with basic commands, added dependencies, started working on lavalink impl
This commit is contained in:
parent
9dad9bbda3
commit
d6a2cb5c8b
13 changed files with 532 additions and 46 deletions
|
@ -5,7 +5,10 @@ use std::error::Error;
|
|||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct Config {
|
||||
pub discord_token: String
|
||||
pub discord_token: String,
|
||||
pub lavalink_address: String,
|
||||
pub lavalink_password: String,
|
||||
pub user_id: u64
|
||||
}
|
||||
|
||||
const CONFIG_FILE: &str = "./data/config.json";
|
||||
|
@ -22,7 +25,10 @@ pub fn load() -> Result<Config, Box<dyn Error>> {
|
|||
|
||||
fn create_empty() -> fs::File{
|
||||
let example_config = Config {
|
||||
discord_token: "paste_your_config".to_string()
|
||||
discord_token: "paste_your_token".to_string(),
|
||||
lavalink_address: "paste_your_lavalink_address".to_string(),
|
||||
lavalink_password: "paste_your_lavalink_password".to_string(),
|
||||
user_id: 1
|
||||
};
|
||||
|
||||
let mut config_file = fs::File::create(CONFIG_FILE).unwrap();
|
||||
|
|
|
@ -1 +1 @@
|
|||
pub mod config;
|
||||
pub mod config;
|
Loading…
Add table
Add a link
Reference in a new issue