Better heuristic for convertMentionsFromNames
braxtonhall opened this issue ยท 0 comments
The current method which convert @mentions
into Discord-compatible <@012345678901234567890>
mentions first replaces roles in an arbitrary order, then each member in an arbitrary order.
This often leads to false matches. For example in a server with the user @bluebird
and the role @Blue
, the Minecraft chat message
Hey @bluebird what are your coords
turns into the Discord message
Hey
@Blue
bird what are your coords
It would be nice if the patterns were sorted by length descending so longer exact strings get matched first.