From 94805a962cec99089cfce90b570d4e40d1b712c9 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 15 Dec 2023 12:18:21 +0100 Subject: [PATCH] add return statement --- mcdcbot/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mcdcbot/src/main.rs b/mcdcbot/src/main.rs index 1dab92d..0f6c9ae 100755 --- a/mcdcbot/src/main.rs +++ b/mcdcbot/src/main.rs @@ -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;