feat: Implemented daily timer

- Bump version to 0.10.0
- Added /timer command
This commit is contained in:
Alexey 2025-12-18 15:58:18 +03:00
commit cc916c06ce
11 changed files with 187 additions and 32 deletions

View file

@ -20,6 +20,7 @@ pub enum Error {
RoomNotFound(u16),
RoomAlreadyUnlocked(u16),
CannotReach(u16),
TimerSet,
}
impl From<serenity::Error> for Error {
@ -63,6 +64,7 @@ impl Display for Error {
Self::RoomNotFound(id) => write!(f, "room #{id} not found"),
Self::RoomAlreadyUnlocked(id) => write!(f, "room #{id} is already unlocked for this user"),
Self::CannotReach(id) => write!(f, "user cannot reach room #{id}"),
Self::TimerSet => write!(f, "timer is already set"),
}
}
}
@ -81,7 +83,8 @@ impl std::error::Error for Error {
Self::InsufficientFunds(_) |
Self::RoomNotFound(_) |
Self::RoomAlreadyUnlocked(_) |
Self::CannotReach(_) => None,
Self::CannotReach(_) |
Self::TimerSet => None,
Self::SerenityError(error) => Some(error),
Self::SquadQuestError(error) => Some(error),
}