Skip to content

Commit

Permalink
feat: add support for teams update (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza authored Aug 25, 2023
1 parent 018d889 commit a26629c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
18 changes: 18 additions & 0 deletions deno/payloads/v10/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated
*/
permissions: ['*'];
/**
Expand All @@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}

/**
Expand All @@ -64,3 +72,13 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}

/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Owner = 'owner',
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}
18 changes: 18 additions & 0 deletions deno/payloads/v9/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated
*/
permissions: ['*'];
/**
Expand All @@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}

/**
Expand All @@ -64,3 +72,13 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}

/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Owner = 'owner',
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}
18 changes: 18 additions & 0 deletions payloads/v10/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated
*/
permissions: ['*'];
/**
Expand All @@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}

/**
Expand All @@ -64,3 +72,13 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}

/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Owner = 'owner',
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}
18 changes: 18 additions & 0 deletions payloads/v9/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated
*/
permissions: ['*'];
/**
Expand All @@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}

/**
Expand All @@ -64,3 +72,13 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}

/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Owner = 'owner',
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}

0 comments on commit a26629c

Please sign in to comment.