Skip to content

chore: use separate struct for Invite roles#522

Open
yokkkoso wants to merge 2 commits intodisgoorg:masterfrom
yokkkoso:chore/invite-role-struct
Open

chore: use separate struct for Invite roles#522
yokkkoso wants to merge 2 commits intodisgoorg:masterfrom
yokkkoso:chore/invite-role-struct

Conversation

@yokkkoso
Copy link
Contributor

Use separate struct for Invite roles because as docs says:

This is a partial role object that only contains id, name, position, color, colors, icon, and unicode_emoji.

And currently, using the default Role sturct results in a unmarshalling error when performing a GET /invites/INVITE_CODE request:

ERROR error unmarshalling response body name=bot name=rest_client err="strconv.ParseInt: parsing \"\": invalid syntax" endpoint=/invites/INVITE_CODE

Copy link
Member

@topi314 topi314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, can you also add the same base methods as the normal role struct?

  • String
  • Mention
  • IconURL

@yokkkoso yokkkoso requested a review from topi314 February 25, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants