Minor fun fixes
This commit is contained in:
parent
513b2c2b6d
commit
a2b0e2e8a8
@ -127,9 +127,20 @@ pub async fn players(
|
||||
}
|
||||
|
||||
#[poise::command(slash_command)]
|
||||
pub async fn join(
|
||||
ctx: poise::Context<'_, Data, serenity::Error>,
|
||||
) -> Result<(), serenity::Error> {
|
||||
ctx.say(format!("To join, type `{}` in the server URL box or search bar.", ctx.data().server.addressable_name())).await?;
|
||||
pub async fn join(ctx: poise::Context<'_, Data, serenity::Error>) -> Result<(), serenity::Error> {
|
||||
let cache = ctx.data().cached_reply.lock().await;
|
||||
match cache.as_ref().unwrap() {
|
||||
ServerResponse::Offline => {
|
||||
ctx.say("Server is offline! Cannot get server info.").await?;
|
||||
},
|
||||
ServerResponse::Online(on) => {
|
||||
ctx.say(format!(
|
||||
"To join, type `{}` in the server URL box or search bar.\nEnsure you are on version `{}`.",
|
||||
on.searchable_name,
|
||||
on.version
|
||||
))
|
||||
.await?;
|
||||
}
|
||||
};
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user