Skip to content

Commit a881178

Browse files
committed
Fix raid not stopping the stream
1 parent b3b8305 commit a881178

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/chat/chat_handler.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,14 +516,11 @@ impl DispatchCommand {
516516
let mut params = {
517517
// Unwrap is safe here because the command was already parsed
518518
let state = self.user.state.read().await;
519+
let msg = &self.chat_message.message;
519520
let chat = state.config.chat.as_ref().unwrap();
520521
let prefix = &chat.prefix;
521522

522-
self.chat_message
523-
.message
524-
.strip_prefix(prefix)
525-
.unwrap()
526-
.split_whitespace()
523+
msg.strip_prefix(prefix).unwrap_or(msg).split_whitespace()
527524
};
528525
params.next();
529526

0 commit comments

Comments
 (0)