diff options
| author | 2020-07-15 10:39:07 +0200 | |
|---|---|---|
| committer | 2020-07-15 10:39:31 +0200 | |
| commit | 403572b83cf3faea9068a25cb09e809d993c1514 (patch) | |
| tree | ef2cb0d49d383a4fd19d883cf3934f68ef2c4654 /tests | |
| parent | Ves' refactor (diff) | |
Create a UserMentionOrID converter.
When we're using the !reply command, using a regular UserConverter is
somewhat problematic. For example, if I wanted to send the message
"lemon loves you", then I'd try to write `!reply lemon loves you` -
however, the optional User converter would then try to convert `lemon`
into a User, which it would successfully do since there's like 60 lemons
on our server.
As a result, the message "loves you" would be sent to a user called
lemon.. god knows which one.
To solve this bit of ambiguity, I introduce a new converter which only
converts user mentions or user IDs into User, not strings that may be
intended as part of the message you are sending.
https://github.com/python-discord/bot/issues/1041
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions