In the case no nickname is matched, FindUserByName matches the input to the first name it can find that starts with this input. This can lead to undesired effect for commands like ship.
To Reproduce
Steps to reproduce the behavior:
Have 2 users without nicknames with overlapping names (e.g. Zen and Zen1)
>ship Zen1
Zen is always matched
Expected behavior
The filter should not use StartsWith, instead it should be as strict as when matching nicknames.
Additional context
A further improvement could be that FindUserByName filters out # if it is present in the string (in case someone types User#0000 without actually tagging them)
Describe the bug
In the case no nickname is matched,
FindUserByName
matches the input to the first name it can find that starts with this input. This can lead to undesired effect for commands like ship.To Reproduce Steps to reproduce the behavior:
Zen
andZen1
)>ship Zen1
Expected behavior
The filter should not use
StartsWith
, instead it should be as strict as when matching nicknames.Additional context
A further improvement could be that
FindUserByName
filters out#
if it is present in the string (in case someone types User#0000 without actually tagging them)