diff --git a/src/err-stackstorm/st2.py b/src/err-stackstorm/st2.py index 7aa60f9..7b2fbba 100644 --- a/src/err-stackstorm/st2.py +++ b/src/err-stackstorm/st2.py @@ -322,7 +322,7 @@ def remove_bot_prefix(msg): """ Drop plugin prefix and any trailing white space from user supplied st2 command. """ - return msg.replace(self.cfg.plugin_prefix, "", 1).strip() + return msg.removeprefix(self.cfg.plugin_prefix).strip() chat_user = msg.frm st2token, err_msg = self.get_token(chat_user)