Skip to content

Commit

Permalink
Merge pull request #47 from dalarsen/main
Browse files Browse the repository at this point in the history
Drop text of bot prefix only if it is a prefix
  • Loading branch information
nzlosh authored Oct 10, 2024
2 parents 4cbe3f2 + 7ac0a3a commit 42d9bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/err-stackstorm/st2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 42d9bf7

Please sign in to comment.