Commit Graph

8224 Commits

Author SHA1 Message Date
Naiyar
6304c0177e feat(ClientApplication): add webhook events (#10588)
* feat(ClientApplication): add webhook events

* refactor: update enum names and add external types

* docs(APITypes): reorder

* chore: requested changes

* chore: requested changes

* docs: remove redundancy

* Update ClientApplication.js

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <github@almeidx.dev>
2024-12-05 18:52:02 +00:00
Qjuh
07eb3865c4 types: fix Client#lastPingTimestamps (#10634)
* types: fix Client#lastPingTimestamps

* docs: consistency

* types: use ReadonlyCollection
2024-12-05 16:46:38 +00:00
Jiralite
0560842a21 feat(EntitlementManager): Support get entitlement (#10606)
* feat: support get entitlement

* docs: add return type

Co-authored-by: Danial Raza <danialrazafb@gmail.com>

* fix: property typo

Co-authored-by: Almeida <github@almeidx.dev>

* fix: property typo

Co-authored-by: Almeida <github@almeidx.dev>

---------

Co-authored-by: Danial Raza <danialrazafb@gmail.com>
Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-12-05 15:55:50 +00:00
Jiralite
a6390716fe feat(monetization): Add get entitlement endpoint (#10605)
feat(monetization): add get entitlement endpoint

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-12-05 15:43:35 +00:00
Jiralite
abf4b6103c types: Export some core-specific types (#10620)
types: export core-specific types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-12-05 09:09:43 +00:00
Jiralite
eceaa85ad4 fix(ThreadChannel): Make ownerId always present (#10618)
fix: thread owner id is always present

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-12-05 08:40:46 +00:00
Danial Raza
d0dc864888 fix: update clientReady event name references (#10632) 2024-12-04 17:42:07 +00:00
Qjuh
bd7a995717 feat(website): include reexported members in docs (#10518)
* feat(website): add re-exported members to docs site

* refactor(scripts): rewrite sourceURL for externals

* feat(website): add external badge

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-12-02 18:28:44 +00:00
René
5f0d28c0fe fix(collection)!: default sort comparison algorithm (#10412)
BREAKING CHANGE: This replaces the previously inaccurate default sort algorithm, which may alter sort results where a user-defined comparison function is not provided.
2024-12-02 08:23:48 +00:00
Jiralite
f5445c8104 fix(RoleManager): Fetching roles is not nullable (#10629)
fix(RoleManager): `fetch()` not nullable

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-29 18:40:12 +00:00
Jiralite
a69600546a docs: Typos (#10628)
chore: typos

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-29 17:39:24 +00:00
Jiralite
8efb72e761 refactor(FetchApplicationCommandOptions): Use Locale over LocaleString (#10625)
refactor(FetchApplicationCommandOptions): prefer `Locale`
2024-11-29 09:57:00 +00:00
Vlad Frangu
5b125eeec9 docs: correct discord-api-types URLs (#10622)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-28 17:50:34 +00:00
Danial Raza
a870bc1bd3 refactor: use cache.get() for snowflakes, resolve() otherwise (#10626)
* refactor: use `cache.get()` for snowflakes, `resolve()` otherwise

* fix: requested changes

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

* chore: remove unnecessary `?? null`

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-28 17:48:04 +00:00
Jiralite
9d62ff57d6 refactor(commands): Use Locale over LocaleString (#10624)
* refactor: use `Locale`

* test: update `LocaleString` tests
2024-11-28 17:33:40 +00:00
Ryan Munro
2b0944a92f feat(InteractionResponses)!: support with_response query parameter (#10499)
BREAKING CHANGE: `InteractionDeferUpdateOptions#fetchReply` was removed, use `InteractionDeferUpdateOptions#withResponse` instead

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-11-28 10:32:05 +02:00
Danial Raza
108943a397 feat: add subscriptions (#10541)
* feat: add subscriptions

* types: fix fetch options types

* fix: correct properties in patch method

* chore: requested changes

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

* fix: correct export syntax

* chore(Entitlement): mark `ends_at` as nullable`

* types(FetchSubscriptionOptions): add missing `cache` option

* Revert "types(FetchSubscriptionOptions): add missing `cache` option"

This reverts commit ba472bdc599e1860754e59fce4806610f06ac682.

* chore(Entitlement): mark `startsTimestamp` as nullable

* fix: requested changes

* docs(SubscriptionManager): correct return type

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-28 08:18:44 +00:00
Jiralite
9010b121f4 fix: query is optional for some endpoints (#10621)
* fix(monetization): `query` is optional

* refactor: more defaults
2024-11-28 08:11:23 +00:00
Jiralite
e89c6b66ac build!: Bump Node.js to 20 (#10616)
BREAKING CHANGE: Node.js 20 or above is required.
2024-11-27 16:37:35 +00:00
Jiralite
3a1b3cc8e1 build: Bump discord-api-types to 0.37.109 (#10619)
build: bump discord-api-types
2024-11-27 15:40:21 +00:00
Jiralite
97ffa201a2 test: Update deprecated emoji test (#10607)
test: update deprecated emoji test

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-27 08:31:11 +00:00
Vlad Frangu
0374079c67 chore(deps): bump discord-api-types (#10611) 2024-11-23 00:07:57 +00:00
Jiralite
98153baf91 build: Update dependencies (#10601)
* build: update dependencies

* build: upgrade pnpm to 9.13.2
2024-11-19 10:30:06 +00:00
Jiralite
b03a9e4043 feat: Emit reaction type on gateway events (#10598)
feat: emit reaction type

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-18 11:58:18 +00:00
Jiralite
2fa7d6246f fix(MessageReaction): Address undefined burst properties (#10597)
* fix(MessageReaction): `undefined` burst properties

* refactor: simpler burst colour check

Co-authored-by: Almeida <github@almeidx.dev>

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-18 11:14:29 +00:00
Ryan Munro
40fbd827fa feat(interactions): support with_response query parameter in core (#10512)
* feat(interactions): support with_response query parameter

* fix: address feedback from comments

* chore: remove extraneous documentation

* fix: return type is now undefined

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-17 22:48:30 +00:00
Jiralite
28d5c84ddc style: Run Prettier (#10604)
style: prettier
@discordjs/voice@0.18.0
2024-11-17 22:31:18 +00:00
Jiralite
c8977f29bd docs: Use info markdown (#10603) 2024-11-17 22:22:26 +00:00
Vlad Frangu
7397dfe49e chore(voice): release @discordjs/voice@0.18.0 (#10602)
* chore(voice): release @discordjs/voice@0.18.0

* chore: aes-256 note in readme
2024-11-17 22:17:45 +00:00
pat
9f8b9b1d66 feat(voice)!: add new encryption methods, remove old methods (#10451)
BREAKING CHANGE: This library no longer supports using `tweetnacl` as an encryption library due to Discord deprecating the algorithms that `tweetnacl` helped us support (read more [here](https://discord.com/developers/docs/change-log#voice-encryption-modes)). Please migrate to one of: `sodium-native`, `sodium`, `@stablelib/xchacha20poly1305`, `@noble/ciphers` or `libsodium-wrappers` unless your system supports `aes-256-gcm` (verify by running `require('node:crypto').getCiphers().includes('aes-256-gcm')`).

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-11-18 00:08:51 +02:00
Jiralite
51a017a14e test: Fix builder methods in type test (#10599)
* test: fix builder methods in type test

* test: remove unused import
2024-11-17 12:18:46 +00:00
Qjuh
c45d912c98 refactor(GuildAuditLogsEntry)!: add type guard for narrowing (#10521)
BREAKING CHANGE: removed `GuildAuditLogsEntry.Targets.All` which wasn’t used anywhere

---------

Co-authored-by: Almeida <github@almeidx.dev>
2024-11-15 14:28:06 +00:00
Jiralite
3669d5e112 docs(channel): Clarify emoji parameter (#10595)
* docs(channel): clarify emoji parameter

* docs: actually add `@example`

* docs: clarify the kind of encoding

Co-Authored-By: Vlad Frangu <me@vladfrangu.dev>

---------

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-15 10:04:31 +00:00
Jiralite
6775175459 feat: Voice Channel Effect Send (#10318)
* feat: Voice Channel Send Effects (#9288)

* feat: add soundboard fields

* chore: address TODO

* docs: volume is a closed interval

* types: use `GatewayVoiceChannelEffectSendDispatchData`

* refactor: prefer getting from cache

* fix: correctly access cache

Co-authored-by: Danial Raza <danialrazafb@gmail.com>

---------

Co-authored-by: Danial Raza <danialrazafb@gmail.com>
2024-11-14 21:00:04 +00:00
Jiralite
e2df0e0dbc docs: Remove Node.js 10 notice (#10593)
docs: remove Node.js 10 notice
2024-11-12 06:50:35 +00:00
Naiyar
b8f5a68297 fix(InteractionResponses): throw error on deleting response of unacknowledged interaction (#10587)
fix: error on deleting response of non-acknowledged interaction

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-11 15:48:52 +00:00
cobalt
f2f7f1f65b refactor(formatters): Change :_: emoji name placeholder (#10567)
* Change `:_:` emoji name placeholder

* Update tests

* Format
2024-11-11 00:42:04 +00:00
René
c97310681d types(collection): simplify ambient constructor declaration (#10549)
- deduplicates constructor definition
- removes Collection's "internal" JSDoc description block
- removes unnecessary `extends` clause

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-07 11:12:53 +00:00
René
ea042458a3 perf(collection): optimisations (#10552)
* perf: `merge()`: deduplicate boolean checks

* perf: `toSorted()`: remove redundant closure

* perf: `last[Key]()`: order of operations

- do not perform iterable-to-array until required
- test ! before <

* perf: `{at,keyAt}()`: manually iterate to target

* perf: `first[Key]()`: avoid `Array.from()`

* perf: `map()`: avoid `Array.from()`

* perf: `random[Key]()`: avoid `Array.from()`

* test: `.{at,keyAt}()` indices

* perf: `last[Key]()`: use `.at()`/`.keyAt()` for single element

* perf: `first[Key]()`: use iterable-to-array if returning all

* perf: `random[Key]()`: use `{at,keyAt}()` for single value

- skip iterable-to-array for returning single value
- short-circuit if amount or collection size is zero

* perf: `random[Key]()`: use Durstenfeld shuffle

* refactor: `{key,keyAt}()`: reorder index check

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-07 11:03:26 +00:00
Jiralite
c34a57b798 fix(ThreadChannel): Address parameter type on fetchOwner() (#10579)
* fix(ThreadChannel): address parameter on owner helper method

* docs: fix description

Co-authored-by: Almeida <github@almeidx.dev>

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-05 22:19:48 +00:00
Naiyar
1184b38d3e refactor(ThreadManager)!: match parent ID when fetching a single thread (#10557)
BREAKING CHANGE: `ThreadManager#fetch` now throws when the provided thread ID doesn't belong to the current channel
2024-11-05 13:00:44 +02:00
Danial Raza
939e3644e1 types: add missing Caches managers (#10540)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-05 09:36:41 +00:00
Souji
f02bdc3be3 docs: add note about idempotence to role add/remove routes (#10586)
* chore(docs): Add note about idempotence to role add/remove routes

* chore: remove trailing spaces
2024-11-05 09:29:29 +00:00
Danial Raza
1fd662629d feat: add subscriptions (#10486)
* feat: add subscriptions

* docs: requested changes

Co-authored-by: Almeida <github@almeidx.dev>

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-04 10:48:41 +00:00
Jiralite
ef2a6879d3 feat(GuildMember): Banners (#10384)
* feat: initial support for guild member banners

* feat: serialise in `toJSON()`

* feat: serialise in `toJSON()`

* docs: lowercase i

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-04 10:43:34 +00:00
Danial Raza
a9f629b0d3 feat: add soundboard (#10536)
* feat: add soundboard

* chore: disable `jsdoc/check-param-names` rule

* fix: export `SoundboardSoundsAPI`
2024-11-04 10:03:13 +00:00
Pablo
ed78e45706 build: bump discord-api-types version (#10575)
* chore: bump discord-api-types version

* fix: delete extra file
2024-10-27 06:15:28 +00:00
Jiralite
b932b64d94 refactor: remove extra traversing (#10580)
* refactor: remove extra traversion

* refactor(GuildScheduledEventManager): address fetch
2024-10-25 09:39:47 +00:00
Jiralite
48a9c665de refactor(InteractionResponses)!: Remove ephemeral response option (#10564)
BREAKING CHANGE: MessagePayload#isInteraction no longer serves a purpose and has been removed.
BREAKING CHANGE: InteractionDeferReplyOptions no longer accepts ephemeral. Use flags instead.
BREAKING CHANGE: InteractionReplyOptions no longer accepts ephemeral. Use flags instead.
2024-10-22 09:10:30 +03:00
Qjuh
6cbe2487bc fix: missing tsdocConfig in api.json preventing index generation (#10565) 2024-10-19 21:34:51 +02:00