feat: message structures (#10982)

* feat: message structures

* fix: docs

* chore: components and more

* feat: embed and more

* feat: more substructures and code review suggestions

* chore: tests and date conversions

* chore: jsdoc strings

* fix: tests

* fix: tests

* feat: hexColor getters

* chore: remove getters for nested data

* chore: apply suggestions from code review

* fix: burst_colors in toJSON

* docs: rephrase SectionBuilder remark

* chore: add LabelComponent

* fix: add name and size to file component

* chore: move resolved interaction data to interactions dir

* fix: code review

* chore: bump discord-api-types

* chore: apply code review suggestions

* fix: lockfile

* chore: update remark

* fix: missing export

* chore: code review and tests

* build: fix file

* fix: typo

* fix: missing toJSON

* fix: remove redundant patch overrides

* chore: missing component suffix

* chore: better name

* chore: add comment explaining timestamp conversion

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
Qjuh
2025-11-28 17:52:42 +01:00
committed by GitHub
parent aeb8986aa1
commit 19253f6b7b
79 changed files with 3281 additions and 93 deletions

View File

@@ -1,6 +1,6 @@
import type { APIConnection } from 'discord-api-types/v10';
import { Structure } from '../Structure.js';
import { kData, kPatch } from '../utils/symbols.js';
import { kData } from '../utils/symbols.js';
import type { Partialize } from '../utils/types.js';
/**
@@ -21,15 +21,6 @@ export class Connection<Omitted extends keyof APIConnection | '' = ''> extends S
super(data);
}
/**
* {@inheritDoc Structure.[kPatch]}
*
* @internal
*/
public override [kPatch](data: Partial<APIConnection>) {
return super[kPatch](data);
}
/**
* The id of the connection account
*/

View File

@@ -1,7 +1,7 @@
import { DiscordSnowflake } from '@sapphire/snowflake';
import type { APIUser } from 'discord-api-types/v10';
import { Structure } from '../Structure.js';
import { kData, kPatch } from '../utils/symbols.js';
import { kData } from '../utils/symbols.js';
import { isIdSet } from '../utils/type-guards.js';
import type { Partialize } from '../utils/types.js';
@@ -24,15 +24,6 @@ export class User<Omitted extends keyof APIUser | '' = ''> extends Structure<API
super(data);
}
/**
* {@inheritDoc Structure.[kPatch]}
*
* @internal
*/
public override [kPatch](data: Partial<APIUser>) {
return super[kPatch](data);
}
/**
* The user's id
*/