Add /calendar
This commit is contained in:
parent
d20c5a49a4
commit
853895df79
5 changed files with 152 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
mod calendar;
|
||||
|
||||
use image::RgbaImage;
|
||||
use showbits_common::{
|
||||
color::{BLACK, WHITE},
|
||||
|
|
@ -20,6 +22,7 @@ pub enum Command {
|
|||
Image(RgbaImage),
|
||||
Photo { image: RgbaImage, title: String },
|
||||
ChatMessage { username: String, content: String },
|
||||
Calendar { year: i32, month: u8 },
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
@ -72,6 +75,7 @@ impl Drawer {
|
|||
Command::ChatMessage { username, content } => {
|
||||
self.on_chat_message(username, content)?
|
||||
}
|
||||
Command::Calendar { year, month } => self.draw_calendar(year, month)?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue