Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(PartialGroupDMChannel): Add recipients & fix name #6713

Merged
merged 3 commits into from Oct 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/structures/PartialGroupDMChannel.js
Expand Up @@ -13,7 +13,7 @@ class PartialGroupDMChannel extends Channel {

/**
* The name of this Group DM Channel
* @type {string}
* @type {?string}
*/
this.name = data.name;

Expand All @@ -22,6 +22,18 @@ class PartialGroupDMChannel extends Channel {
* @type {?string}
*/
this.icon = data.icon;

/**
* Recipient data received in a {@link PartialGroupDMChannel}.
* @typedef {Object} PartialRecipient
* @property {string} username The username of the recipient
*/

/**
* The recipients of this Group DM Channel.
* @type {PartialRecipient[]}
*/
this.recipients = data.recipients;
}

/**
Expand Down
7 changes: 6 additions & 1 deletion typings/index.d.ts
Expand Up @@ -1510,8 +1510,9 @@ export class OAuth2Guild extends BaseGuild {

export class PartialGroupDMChannel extends Channel {
public constructor(client: Client, data: RawPartialGroupDMChannelData);
public name: string;
public name: string | null;
public icon: string | null;
public recipients: PartialRecipient[];
public iconURL(options?: StaticImageURLOptions): string | null;
}

Expand Down Expand Up @@ -4542,6 +4543,10 @@ export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;

export type RecursiveReadonlyArray<T> = ReadonlyArray<T | RecursiveReadonlyArray<T>>;

export interface PartialRecipient {
username: string;
}

export type PremiumTier = keyof typeof PremiumTiers;

export interface PresenceData {
Expand Down