smol bot
add sizes as footer
bendn 2025-02-09
parent 6064fb2 · commit 330dc21
-rw-r--r--rust-toolchain.toml2
-rw-r--r--src/bot/schematic.rs6
-rw-r--r--src/main.rs6
3 files changed, 8 insertions, 6 deletions
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
deleted file mode 100644
index e5d982c..0000000
--- a/rust-toolchain.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[toolchain]
-channel = "nightly-2024-06-20"
diff --git a/src/bot/schematic.rs b/src/bot/schematic.rs
index 96c1720..bd61a85 100644
--- a/src/bot/schematic.rs
+++ b/src/bot/schematic.rs
@@ -134,8 +134,14 @@ pub async fn send(
{
e = e.description(v);
}
+ let f = if v.width == v.height {
+ format!("{}²={}", v.width, v.width * v.height)
+ } else {
+ format!("{}×{}={}", v.height, v.width, v.width * v.height)
+ };
e.field("req", cost(&v), true)
.title(name.clone())
+ .footer(CreateEmbedFooter::new(f))
.color(SUCCESS)
});
let h = m.channel.send_message(c, msg).await?;
diff --git a/src/main.rs b/src/main.rs
index 6d43592..a3d36be 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,12 +2,10 @@
#![feature(
let_chains,
generic_const_exprs,
- effects,
- lazy_cell_consume,
iter_intersperse,
if_let_guard,
- const_mut_refs,
- backtrace_frames
+ backtrace_frames,
+ const_trait_impl
)]
emojib::the_crate! {}