feat: Completed commands list
- Added MapError::CannotReach variant - Updated Map::unlock_room_for_account to check reachableness - Added /info command - Added /unlock command - Added /move command - Added /reset command
This commit is contained in:
parent
4ba57b925a
commit
b6ea2d8958
11 changed files with 170 additions and 12 deletions
|
|
@ -8,6 +8,7 @@ pub mod init;
|
|||
pub mod answer;
|
||||
pub mod social;
|
||||
pub mod account;
|
||||
pub mod map;
|
||||
|
||||
#[poise::command(prefix_command)]
|
||||
pub async fn register(ctx: Context<'_>) -> Result<(), Error> {
|
||||
|
|
@ -15,6 +16,21 @@ pub async fn register(ctx: Context<'_>) -> Result<(), Error> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[poise::command(
|
||||
prefix_command,
|
||||
slash_command,
|
||||
)]
|
||||
pub async fn info(ctx: Context<'_>) -> Result<(), Error> {
|
||||
let reply_string = format!("\
|
||||
SquadQuest version {ver}\n\
|
||||
Find the map here: {url}",
|
||||
ver = env!("CARGO_PKG_VERSION"),
|
||||
url = "not implemented yet!",
|
||||
);
|
||||
ctx.say(reply_string).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn error_handler(error: poise::FrameworkError<'_, Data, Error>) {
|
||||
eprintln!("ERROR:");
|
||||
print_error_recursively(&error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue