aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Qwerty-133 <[email protected]>2021-08-29 16:06:21 +0530
committerGravatar Qwerty-133 <[email protected]>2021-08-29 17:31:35 +0530
commit13af64d4f275b82380b885dbd31fe49a747b69f3 (patch)
treef6f20f1ca466884de6430fc92f6988620089977a
parentMake the helper function more readable (diff)
Add more clarity to docstrings
Clarify what Discord usernames are and the usage of the word "ambiguity".
Diffstat (limited to '')
-rw-r--r--bot/converters.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bot/converters.py b/bot/converters.py
index 54ee2a90a..bd4044c7e 100644
--- a/bot/converters.py
+++ b/bot/converters.py
@@ -496,7 +496,7 @@ class HushDurationConverter(Converter):
def _is_an_unambiguous_user_argument(argument: str) -> bool:
- """Check if the provided argument is a user mention, user id, or username."""
+ """Check if the provided argument is a user mention, user id, or username (name#discrim)."""
has_id_or_mention = bool(IDConverter()._get_id_match(argument) or RE_USER_MENTION.match(argument))
# Check to see if the author passed a username (a discriminator exists)
@@ -512,10 +512,10 @@ AMBIGUOUS_ARGUMENT_MSG = ("`{argument}` is not a User mention, a User ID or a Us
class UnambiguousUser(UserConverter):
"""
- Converts to a `discord.User`, but only if a mention, userID or a username is provided.
+ Converts to a `discord.User`, but only if a mention, userID or a username (name#discrim) is provided.
Unlike the default `UserConverter`, it doesn't allow conversion from a name.
- This is useful in cases where that lookup strategy would lead to ambiguity.
+ This is useful in cases where that lookup strategy would lead to too much ambiguity.
"""
async def convert(self, ctx: Context, argument: str) -> discord.User:
@@ -528,10 +528,10 @@ class UnambiguousUser(UserConverter):
class UnambiguousMember(MemberConverter):
"""
- Converts to a `discord.Member`, but only if a mention, userID or a username is provided.
+ Converts to a `discord.Member`, but only if a mention, userID or a username (name#discrim) is provided.
Unlike the default `MemberConverter`, it doesn't allow conversion from a name or nickname.
- This is useful in cases where that lookup strategy would lead to ambiguity.
+ This is useful in cases where that lookup strategy would lead to too much ambiguity.
"""
async def convert(self, ctx: Context, argument: str) -> discord.Member: