Commit Graph

468 Commits

Author SHA1 Message Date
Almeida
c89c343b0a types(InteractionReplyOptions): allow setting MessageFlags.SuppressNotifications (#9199) 2024-02-20 20:28:37 +00:00
Danial Raza
992aa67841 feat(MessageCreateOptions): add enforceNonce (#10129)
Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-17 18:31:14 +00:00
Suneet Tipirneni
543d61737e feat: add support for using keyword on discord.js Client and WebSocketManager (#10063)
* feat: add support for `using` keyword on client

* fix: use async dispose

* feat: add support for web socket manager disposing

* fix: use interface for client

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-13 17:48:56 +00:00
Almeida
f48cb2a357 refactor: remove usage of mixin on error classes (#10128) 2024-02-13 11:54:56 +00:00
Qjuh
54106dbd81 types: replace Mixins with interface merging (#10094)
* types(TextBasedChannelMixin): refactor to user interface merging instead

* types(WebhookMixin): refactor to interface merging

* fix: ignore empty-interface tslint errors

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-11 19:26:20 +00:00
Almeida
42bc5d2c74 fix: invert deletable message types list (#10093)
* fix: invert deletable message types list

* docs: consistency

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-03 21:49:11 +00:00
Almeida
bfc7bb5564 docs: convert comment into private remark (#10097)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-22 18:45:49 +00:00
Almeida
33674be85e feat(Webhook): allow setting appliedTags on send() (#10027)
* feat(Webhook): allow setting `appliedTags` on `send()`

* docs: fix grammar

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-15 22:29:49 +00:00
Almeida
c4fcee3ef6 feat: premium application subscriptions (#9907)
* feat: premium application subscriptions

* types: readonly array

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

* fix: requested changes

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

* fix: core client types

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-24 15:49:58 +00:00
Jiralite
db56324624 types(DirectoryChannel): Ensure directory channels cannot contain user mentions when stringified (#10043)
* types(DirectoryChannel): `ChannelMention` `toString()`

* refactor: dynamic test
2023-12-18 22:30:24 +00:00
advaith
1acc9abae2 types: change Awaitable<void> to void (#10017)
Co-authored-by: Almeida <almeidx@pm.me>
2023-12-17 13:54:21 +00:00
Jiralite
e245a390e7 docs(resolvePartialEmoji): Add @internal to all overloads (#10033)
docs: add `@internal`
2023-12-05 19:19:52 +00:00
Jiralite
2b8ac35e56 refactor: Document relevant types as @internal (#9974)
* refactor: mark data resolver as internal

* docs: mark relevant TypeScript symbols as `@internal`

* docs: extra additions

* style: prefer at end

* docs: add more `@internal`s

* test: update template code
2023-12-05 18:15:08 +00:00
Qjuh
17a6f5d3c9 types: omit unnecessary methods from <ContextMenuCommandInteraction>.options (#10003)
* types: omit getUser/Member/Message from ContextMenu interaction

* types: omit getAttachment and add tests

* fix: remove duplicate tests
2023-12-01 20:13:20 +00:00
Qjuh
a44ada661f feat(website): show union members of type aliases (#10001)
* feat(website): show union members of type aliases

* refactor: suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
2023-12-01 02:19:07 +01:00
Renegade334
179af387d0 refactor(ThreadMemberManager): #remove accepts UserResolvable (#10000)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-12-01 00:35:59 +00:00
Vlad Frangu
e412a22ceb fix: export "ESM" types when discord.js is imported in ESM land (#10009)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-30 23:19:22 +00:00
Jiralite
30f6a5fc56 types(InteractionWebhook): Add client (#9997)
types(InteractionWebhook): add `client`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-30 21:48:54 +00:00
Qjuh
802ec63a48 fix(website): cross package deprecated links (#9981)
* refactor: minify api.json by shortening keys

* fix: links to other packages

* refactor: get doclink from canonicalReference, not model

* fix: types

* fix: again

* fix: @link tags with alt texts

* fix(website): cross-package links in @deprecated
2023-11-18 11:45:32 +01:00
Qjuh
9868772b64 docs: fix links in @deprecated tags (#9976)
types: fix links in @deprecated tags
2023-11-17 20:44:39 +00:00
iCrawl
8f432400d8 build: multi-config build and dep update 2023-11-14 01:26:22 +01:00
Qjuh
b79351ba99 fix(website): misc improvements (#9940)
* refactor: use tokenRange for typeParams in heritage

* fix: correct type param replacement

* fix: ae config, link builtin in summary, `: | T` => `: T`, mainlib tsdoc

* fix: requested changes and tests

* chore: better deprecation messages and code cleanup

* fix: cleanup optional chainings

---------

Co-authored-by: Almeida <almeidx@pm.me>
2023-11-13 09:55:23 +01:00
Almeida
40726db722 refactor: use formatters (#9956)
* refactor: use formatters

* fix: imports

* fix: imports pt.2

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 21:56:10 +00:00
Aura
4bc1dae36f types: use wrapper utilities (#9945)
* types: use `Awaitable<T>` instead of `Promise<T> | T`

* types: use `JSONEncodable<T>` over raw definition

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 21:40:59 +00:00
Almeida
975d5f18ae chore: use descriptive type parameter names (#9937)
* chore: use descriptive type parameter names

* refactor: requested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 17:21:51 +00:00
Jaw0r3k
4ff3ea4a1b feat: default select menu values (#9867)
* feat: default select menu values

* feat(Message): support

* fix: fix crashes when an array is supplied and remove assertion

* docs(transformResolved): `BaseChannel` is the correct type

* refactor: prefer assignment

* chore: export function again

* fix(Util): fix circular dependency

* refactor(MentionableSelectMenu): clone in method

* docs: remove semicolon

* feat(MentionableSelectMenu): add `addDefaultValues()`

* refactor: reduce overhead

* types: adjust `channel`

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-11-12 16:32:41 +00:00
Aura
5b0aa92c81 refactor(utils): remove mergeDefault (#9938)
* refactor(utils): remove `mergeDefault`

`BaseClient` and `ShardingManager` not longer mutate options

* refactor(ShardingManager): avoid reassigning method argument
2023-11-11 09:50:50 +00:00
Qjuh
da455bceea feat: mainlib docs on new website (#9930)
* fix(ExceptText): don't display import("d..-types/v10"). in return type

* Squashed 'packages/api-extractor-model/' content from commit 39ecb196c

git-subtree-dir: packages/api-extractor-model
git-subtree-split: 39ecb196ca210bdf84ba6c9cadb1bb93571849d7

* Squashed 'packages/api-extractor/' content from commit 341ad6c51

git-subtree-dir: packages/api-extractor
git-subtree-split: 341ad6c51b01656d4f73b74ad4bdb3095f9262c4

* feat(api-extractor): add api-extractor and -model

* fix: package.json docs script

* fix(SourcLink): use <> instead of function syntax

* fix: make packages private

* fix: rest params showing in docs, added labels

* fix: missed two files

* feat: merge docs.json from docgen and docs.api.json

* fix: cpy-cli & pnpm-lock

* fix: increase icon size

* fix: icon size again

* feat: run both docs on mainlib

* chore: website fixes

* fix: more website fixes

* fix: tests and dev database script

* chore: comment out old docs

* fix: increase max fetch cache

* fix: env should always be a string

* fix: try to reapply patches

* fix: remove prepare for docgen

* fix: temporary cosmetic fixes

* fix: horizontal scroll

* feat: generate index for new docs

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
2023-11-08 10:16:54 +01:00
iCrawl
6b9f906b03 chore: properly rename folder 2023-11-08 00:44:39 +01:00
Jiralite
b6c762cb84 feat(Emoji): Add imageURL() (#9788)
feat(Emoji): add `imageURL()`
2023-11-05 18:01:45 +00:00
Almeida
7671a836f4 feat: onboarding mode and edit method (#9647)
* feat: onboarding mode and edit method

* feat(guild): add `editOnboarding`

* fix: use discord-api-types

* types: make arrays readonly

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

* fix: bring up to date

* docs: id is a snowflake

* fix: requested changes

* refactor: make most options optional

* refactor: provide GuildEmoji or Emoji instance

* revert: changes to Util

* fix: rebase leftovers

* fix: allow passing option id

* fix: requested changes

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-17 19:30:10 +00:00
Jiralite
8cfadb6953 docs: Remove duplicate APIEmoji (#9880)
* types: remove duplicate type definition

* chore: add `Emoji` to method

* types(resolvePartialEmoji): overload method
2023-10-10 13:44:21 +00:00
Jan Parisek
7422d9f172 types(Partials): add toString() method to supported Partials (#9835)
* types(Partials): add toString() method to supported Partials

- includes `PartialDMChannel`, `PartialGuildMember` and `PartialUser`
- does not include
    - `PartialMessage`, since `<PartialMessage>.content` is always null
    - `PartialMessageReaction`, since `MessageReaction` has no `toString()` method
    - `PartialThreadMember`, since `ThreadMember` has no `toString()` method

* types(Partials): replace type of `toString()` methods with return type

* test(Partials): add tests

* types(Partialize): refactor Partialize

* test(PartialThreadMember): fix typo

* types(Partials): clean up unnecessary type overrides

* test(Partials): add tests for <Partials>.partial property

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-10-10 13:39:28 +00:00
Jiralite
1fe7247528 feat: Support new application properties and patch endpoint (#9709)
* feat: support new application endpoints

* chore: edit comment

* fix(ClientApplication): handle flags properly

* types: `readonly`

* chore: update route

* feat: add to core

* refactor(ClientApplication): add to user manager

* chore: remove comments

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-10 13:25:26 +00:00
cobalt
699b232922 feat(BaseChannel): Add isThreadOnly() (#9847)
* add isThreadBased

* Update typings

* fix name

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-10 13:13:57 +00:00
Danial Raza
11f6955ed9 refactor: use proper variable names in callbacks (#9840)
* refactor: use proper variable names in callbacks

* refactor: change parameter names

* refactor: change remaining parameter names

* refactor: change remaining variable names

* refactor(GuildAuditLogsEntry): abstract reduce logic into a new function

* chore: undo unrelated changes

This undoes commit b2d93dce51 as it's unrelated

* refactor: more name changes

* chore: fix tests failing

* refactor: use option instead of opt

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-10-09 19:49:49 +00:00
Jiralite
2aa3250584 types(MessageEditOptions): Correct attachments type (#9874)
types(MessageEditOptions): fix `attachments` type

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-09 07:18:41 +00:00
Jiralite
3c043d83a9 types(UserContextMenuCommandInteraction): Nullify targetMember (#9844)
types(UserContextMenuCommandInteraction): nullify `targetMember`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-29 16:14:36 +00:00
Almeida
931c3ed593 feat(StageInstanceManager): add guildScheduledEvent to create() (#8885)
* feat(StageInstanceManager): add `guildScheduledEvent` to `create()`

* fix: requested changes

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-09-28 18:27:15 +00:00
Jiralite
1e5c14b741 feat: Support default_thread_rate_limit_per_user in channel creation (#9273)
feat: support `default_thread_rate_limit_per_user` in channel creation
2023-09-19 18:11:46 +00:00
Jiralite
571aedd58a feat: Add media channels (#9662)
* feat: add media channels

* refactor: rename to `ThreadOnlyChannel`

* feat: support media channels more

* docs(ThreadOnlyChannel): update class description

* types: update references

* test: add more tests

* chore: update code

* refactor: `abstract`

Co-authored-by: space <spaceeec@yahoo.com>

---------

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-18 07:35:47 +00:00
Jiralite
e02a59bbb6 refactor: Stickers are free (no more "premium" packs) (#9791)
refactor: stickers are free

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-18 07:29:47 +00:00
Jiralite
32d614ccd3 fix(GuildScheduledEvent): Use if...else pattern and handle partials (#9802)
fix: handle partial case

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-18 07:26:22 +00:00
Jiralite
4588e075c3 docs(DiscordjsErrorCodes): Deprecate unused properties (#9790)
docs(DiscordjsErrorCodes): deprecate unused properties

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-17 21:52:38 +00:00
Jiralite
b6a2441819 feat: Support widget image URL (#9782)
* feat: add widget image URL

* docs(GuildManager): correct parameter type

Co-authored-by: space <spaceeec@yahoo.com>

---------

Co-authored-by: space <spaceeec@yahoo.com>
2023-09-17 18:26:47 +00:00
Souji
310979808e feat(GuildAuditLogsEntry): expose extra integrationType in relevant log types (#9796)
* feat(GuildAuditLogsEntry): expose ingrationType

* fix: not optional, if extra is present on these types

not necessary, as it is conditionally assigned

* fix: remove non-extra approach

* fix(types): string is not guaranteed to be the known enum

* fix: adapt type tests to new extra properties

* fix: include null in type, since extra is not always populated

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-09-17 09:47:46 +00:00
Danial Raza
c66636da11 feat: add support for teams update (#9805)
* refactor(TeamMember): deprecate permissions property

* feat: add support for team member roles

* feat: add reference to external team member role enum

* docs: suggested changes

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-15 18:18:33 +00:00
Superchupu
9dbc9542c4 types: don't include dom types (#9831)
* types: don't include dom types

* types: try to fix websocket imports
2023-09-11 19:59:36 +00:00
n1ck_pro
6404c013e7 types(Client): fix isReady narrowing (#9828)
* types(Client): fix isReady narrowing

* chore: add requested changes

* chore: test both ready cases

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-10 11:49:00 +00:00
Souji
485dd718c5 feat(Presence): Expose sync_id in Activity (#9766)
* feat(Presence): Expose sync_id in Activity

* chore: mention non-documentation

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-08-25 19:53:53 +00:00