universe.categories["internal"]["language"].get(
"default_punctuation"))
action = ""
- for mark in actions.keys():
+
+ # reverse sort punctuation options so the longest match wins
+ for mark in sorted(actions.keys(), reverse=True):
if not literal and message.endswith(mark):
action = actions[mark]
break