feat: Implementation config
- Bump version to 0.7.0 - Added Config::init_path - Added Error::IsNotImplemented - discord: added implementation config init/load - discord: added /init - discord: added /quest update
This commit is contained in:
parent
b92eaa1241
commit
520992187d
10 changed files with 147 additions and 12 deletions
|
|
@ -22,14 +22,21 @@ async fn main() {
|
|||
|
||||
let cli = cli::Cli::parse();
|
||||
let config = Config::load(cli.config.clone());
|
||||
let discord = config.discord_impl().expect("config does not define impl_path");
|
||||
let discord = config.discord_impl().unwrap_or_else(|_| {
|
||||
config.init_impl().unwrap();
|
||||
config.discord_impl().unwrap()
|
||||
});
|
||||
|
||||
let token = std::env::var("DISCORD_TOKEN").expect("missing DISCORD_TOKEN");
|
||||
let intents = serenity::GatewayIntents::non_privileged();
|
||||
|
||||
let framework = poise::Framework::builder()
|
||||
.options(poise::FrameworkOptions {
|
||||
commands: vec![commands::quest::quest(), commands::register()],
|
||||
commands: vec![
|
||||
commands::quest::quest(),
|
||||
commands::register(),
|
||||
commands::init::init()
|
||||
],
|
||||
..Default::default()
|
||||
})
|
||||
.setup(|ctx, _ready, framework| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue