html terminal
Diffstat (limited to 'src/bot/maps.rs')
-rw-r--r--src/bot/maps.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bot/maps.rs b/src/bot/maps.rs
index e1a1b99..e00d394 100644
--- a/src/bot/maps.rs
+++ b/src/bot/maps.rs
@@ -34,6 +34,13 @@ impl Maps {
}
}
+pub async fn has(map: &str, ctx: &Context<'_>) -> bool {
+ Maps::get_all(&ctx.data().stdin)
+ .await
+ .iter()
+ .any(|x| map == x)
+}
+
pub async fn autocomplete<'a>(
ctx: Context<'a>,
partial: &'a str,