Alter warning role verification (fix?)#400
Alter warning role verification (fix?)#400szykaro23 wants to merge 3 commits intoFederationStudios:mainfrom
Conversation
Avoid casting interaction.member to GuildMemberRoleManager by fetching the full GuildMember for the user and checking member.roles.cache.has(...). This prevents runtime errors when interaction.member is partial or missing roles data and ensures an accurate authorization check for altering warnings. Also removes the now-unused GuildMemberRoleManager import.
This comment was marked as outdated.
This comment was marked as outdated.
|
The whole reason why I typecast to The true solution? Update everything to |
|
@totallytavi Hopefully that is what you meant, if not then let me know and I will work on it the way you want it to be 🫡 |
|
Wait, I used |
|
Bump @totallytavi |
Avoid casting interaction.member to GuildMemberRoleManager by fetching the full GuildMember for the user and checking member.roles.cache.has(...). This prevents runtime errors when interaction.member is partial or missing roles data and ensures an accurate authorization check. Current version seems to be causing errors, possibly by not being able to verify roles. Also removes the now unused GuildMemberRoleManager import.