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:
Alexey 2025-12-15 15:19:07 +03:00
commit b6ea2d8958
11 changed files with 170 additions and 12 deletions

View file

@ -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);