shayypy / guilded.py

Asynchronous Guilded API wrapper for Python
https://guildedpy.rtfd.io
Other
133 stars 25 forks source link

MemberConverter doesn't accept user mention as argument #43

Closed henry232323 closed 2 years ago

henry232323 commented 2 years ago

Describe the bug I can't target a user using a mention when attempting to convert, only with the raw name or user ID

To Reproduce This fails await commands.MemberConverter().convert(ctx, "@Henry") This succeeds await commands.MemberConverter().convert(ctx, "Henry")

Expected behavior Return the user successfully

Actual behavior Throws that it can't find the user

shayypy commented 2 years ago

Yes, because @Henry is not in the proper mention format nor is it the (nick)name of any member in the server. Hopefully in the future Guilded will deliver useful strings in place of this, especially considering they already accept <@id> in embed markdown. If you can get confirmation that this is not planned then I'll change the converter to parse out leading @s and attempt to find the proper user.

henry232323 commented 2 years ago

Sorry, I did want to clarify. When reading messages containing pings, they come in the form @Henry, within the message content, as such the member converter fails to target someone using the ping, same going for channels afaict

shayypy commented 2 years ago

I'm aware. As mentioned in my comment, it is presumed that Guilded will change their sent payloads such that this is not the case, otherwise this issue will be addressed as intended. If I can at all avoid it, this is not guesswork that I want to have done by the library (for example, if two separate members are mentioned with the display name Henry, how will the library know which is which?)