mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(Teams): backport support for teams (#3357)
* feat(Teams): backport support for teams
PR #3350
Commit: a22aabf6a8
* fix(TeamMember): fix name of client property
* refactor(OAuth2Application): make team nullable instead of optional
* typings(OAuth2Application): make team nullable instable of optional
* docs(OAuth2Application): deprecate and add an info to team property
This commit is contained in:
32
typings/index.d.ts
vendored
32
typings/index.d.ts
vendored
@@ -935,6 +935,7 @@ declare module 'discord.js' {
|
||||
public rpcApplicationState: boolean;
|
||||
public rpcOrigins: string[];
|
||||
public secret: string;
|
||||
public team: Team | null;
|
||||
public reset(): OAuth2Application;
|
||||
public toString(): string;
|
||||
}
|
||||
@@ -1232,6 +1233,34 @@ declare module 'discord.js' {
|
||||
public setBitrate(bitrate: number | 'auto'): void;
|
||||
}
|
||||
|
||||
export class Team {
|
||||
constructor(client: Client, data: object);
|
||||
public readonly client: Client;
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
public icon: string | null;
|
||||
public readonly iconURL: string;
|
||||
public id: Snowflake;
|
||||
public members: Collection<Snowflake, TeamMember>;
|
||||
public name: string;
|
||||
public readonly owner: TeamMember;
|
||||
public ownerID: Snowflake | null;
|
||||
|
||||
public toString(): string;
|
||||
}
|
||||
|
||||
export class TeamMember {
|
||||
constructor(client: Client, team: Team, data: object);
|
||||
public readonly client: Client;
|
||||
public id: Snowflake;
|
||||
public membershipState: MembershipStates;
|
||||
public permissions: string[];
|
||||
public team: Team;
|
||||
public user: User;
|
||||
|
||||
public toString(): string;
|
||||
}
|
||||
|
||||
export class TextChannel extends TextBasedChannel(GuildChannel) {
|
||||
constructor(guild: Guild, data: object);
|
||||
public lastMessageID: string;
|
||||
@@ -1873,6 +1902,9 @@ declare module 'discord.js' {
|
||||
|
||||
type InviteResolvable = string;
|
||||
|
||||
type MembershipStates = 'INVITED'
|
||||
| 'ACCEPTED';
|
||||
|
||||
type MessageCollectorOptions = CollectorOptions & {
|
||||
max?: number;
|
||||
maxMatches?: number;
|
||||
|
||||
Reference in New Issue
Block a user