diff --git a/packages/api-types/src/v10/index.ts b/packages/api-types/src/v10/index.ts index 1656d74..43869be 100644 --- a/packages/api-types/src/v10/index.ts +++ b/packages/api-types/src/v10/index.ts @@ -753,7 +753,7 @@ export interface DiscordChannel { /** When a thread is created this will be true on that channel payload for the thread. */ newly_created?: boolean; /** The recipients of the DM*/ - recipents?: DiscordUser[]; + recipients?: DiscordUser[]; } /** https://discord.com/developers/docs/topics/gateway#presence-update */ diff --git a/packages/core/src/structures/channels.ts b/packages/core/src/structures/channels.ts index 6c2eb38..68c34ef 100644 --- a/packages/core/src/structures/channels.ts +++ b/packages/core/src/structures/channels.ts @@ -719,14 +719,14 @@ export class DMChannel extends BaseChannel implements Model { constructor(session: Session, data: DiscordChannel) { super(session, data); - if (data.owner_id && data.recipents) { - this.user = new User(session, data.recipents.find(user => user.id === data.owner_id)!); + if (data.owner_id && data.recipients) { + this.user = new User(session, data.recipients.find(user => user.id === data.owner_id)!); } else { - this.user = new User(session, data.recipents!.find(user => user.id === this.session.botId)!); + this.user = new User(session, data.recipients!.find(user => user.id === this.session.botId)!); } - if (data.recipents && data.recipents.length > 1) { - this.group = data.recipents.map(r => new User(this.session, r)); + if (data.recipients && data.recipients.length > 1) { + this.group = data.recipients.map(r => new User(this.session, r)); } this.type = data.type as ChannelTypes.GroupDm | ChannelTypes.GroupDm;