Add option types for top-level commands
This commit is contained in:
@ -8,11 +8,11 @@ use poise::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
commands::autocomplete::timezone_autocomplete, consts::THEME_COLOR, models::CtxData, Context,
|
||||
Error,
|
||||
commands::autocomplete::timezone_autocomplete, consts::THEME_COLOR, models::CtxData,
|
||||
utils::Extract, Context, Error,
|
||||
};
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Serialize, Deserialize, Extract)]
|
||||
pub struct Options {
|
||||
pub timezone: Option<String>,
|
||||
}
|
||||
@ -116,7 +116,7 @@ You may want to use one of the popular timezones below, otherwise click [here](h
|
||||
}
|
||||
|
||||
/// Select your timezone
|
||||
#[poise::command(slash_command, identifying_name = "timezone")]
|
||||
#[poise::command(slash_command, rename = "timezone")]
|
||||
pub async fn command(
|
||||
ctx: Context<'_>,
|
||||
#[description = "Timezone to use from this list: https://gist.github.com/JellyWX/913dfc8b63d45192ad6cb54c829324ee"]
|
||||
|
Reference in New Issue
Block a user