You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using mentionable select menus in a project where I ran into GenericIds being returned when receiving data. It would be nice to receive a union type of roles and users such that they can be distinguished. My current solution to distinguishing is simply to first see if the ID is cached as a user then as a role on the guild if it occurred in a guild.
Discord already sends resolved values during this interaction so there is a better approach than looking into the caches. By simply adding something like this, it becomes much easier to work with:
I am using mentionable select menus in a project where I ran into
GenericId
s being returned when receiving data. It would be nice to receive a union type of roles and users such that they can be distinguished. My current solution to distinguishing is simply to first see if the ID is cached as a user then as a role on the guild if it occurred in a guild.Discord already sends resolved values during this interaction so there is a better approach than looking into the caches. By simply adding something like this, it becomes much easier to work with:
Ideally, having the values of the kind contain some union type that can be distinguished would be nice. I.e., the variant was something like this:
Or at the very least have a method that can spit something like that out.
I am willing to help with implementing this as well, but I will certainly need input on how you want it to be approached. :)
The text was updated successfully, but these errors were encountered: