Add option types for top-level commands

This commit is contained in:
jude
2024-02-18 11:04:43 +00:00
parent c1305cfb36
commit 5e39e16060
22 changed files with 395 additions and 268 deletions

View File

@ -35,9 +35,9 @@ use tokio::sync::{broadcast, broadcast::Sender, RwLock};
use crate::{
commands::{
allowed_dm, clock::clock, clock_context_menu::clock_context_menu, command_macro,
dashboard::dashboard, delete, donate::donate, help::help, info::info, look, multiline,
nudge, offset, pause, remind, settings, timer, timezone, todo, webhook,
allowed_dm, clock, clock_context_menu::clock_context_menu, command_macro, dashboard,
delete, donate, help, info, look, multiline, nudge, offset, pause, remind, settings, timer,
timezone, todo, webhook,
},
consts::THEME_COLOR,
event_handlers::listener,
@ -103,12 +103,12 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
let options = poise::FrameworkOptions {
commands: vec![
help(),
info(),
donate(),
clock(),
help::command(),
info::command(),
clock::command(),
donate::command(),
clock_context_menu(),
dashboard(),
dashboard::command(),
timezone::command(),
poise::Command {
subcommands: vec![
@ -141,8 +141,8 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
pause::command(),
offset::command(),
nudge::command(),
look::look(),
delete::delete(),
look::command(),
delete::command(),
poise::Command {
subcommands: vec![
timer::list_timer::list_timer(),
@ -151,7 +151,7 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
],
..timer::timer()
},
multiline::multiline(),
multiline::command(),
remind::command(),
poise::Command {
subcommands: vec![