-
-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Issue description
According to API docs, the invite resource now has roles. (When creating an invite, the client UI now has the option to pick roles to assign on join, and these are visible in the invites table in the server settings.)
https://discord.com/developers/docs/resources/invite#invite-object
It's not documented yet as part of the gateway event, but in testing a role_ids?: Snowflake[] property does appear to be included.
https://discord.com/developers/docs/events/gateway-events#invite-create
And it's part of guild and channel invite request responses.
https://discord.com/developers/docs/resources/guild#get-guild-invites
https://discord.com/developers/docs/resources/channel#get-channel-invites
https://discord.com/developers/docs/resources/channel#create-channel-invite
Code sample
This can be worked around in the interim with declaration merging.
declare module 'discord-api-types/v10' {
interface APIInvite {
roles?: APIRole[]
}
}Package version
0.38.37
Runtime
Node.js
Runtime version
v24.11.1
Priority this issue should have
Low (slightly annoying)