add return statement

This commit is contained in:
Mark 2023-12-15 12:18:21 +01:00
parent 8693508435
commit 94805a962c

View File

@ -46,6 +46,7 @@ async fn start(
if ctx.channel_id() != cid {
ctx.say(format!("This command can only be used in <#{cid}>.",))
.await?;
return Ok(());
}
}
// find server by name
@ -123,6 +124,7 @@ async fn stop(ctx: Context<'_>) -> Result<(), Error> {
if ctx.channel_id() != cid {
ctx.say(format!("This command can only be used in <#{cid}>.",))
.await?;
return Ok(());
}
}
let current_lock = ctx.data().current.lock().await;
@ -151,6 +153,7 @@ async fn run_command(
if ctx.channel_id() != cid {
ctx.say(format!("This command can only be used in <#{cid}>.",))
.await?;
return Ok(());
}
}
let current_lock = ctx.data().current.lock().await;