Commit Graph

676 Commits

Author SHA1 Message Date
Dawid Jaworski
de14c92c11 feat(ClientUser): Add support for setting bot banner (#10176)
* feat(discord.js): added support to setting bot banner

added feature to set banner for bot from code level
the function is in the experimental phase of Discord.

* fix: resolve requested changes

* fix: add missing type in ClientUserEditOptions

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-04-09 14:09:01 +00:00
n1ck_pro
f1f2683dc7 docs: remove unused Locale typedef (#10191)
docs: remove unused typedef

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-04 19:34:13 +00:00
codershiba
b6bdd578b9 feat(GuildBanManager): Add bulkCreate() method (#10182) 2024-04-02 19:38:48 +00:00
Danial Raza
ddc927fabd fix(Embed): address equals method issue (#10152)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-03-24 14:45:56 +00:00
Danial Raza
f500ad6e2e refactor(ThreadChannel): use single thread member endpoint (#10136)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-03-24 14:41:29 +00:00
Danial Raza
f67da74a5a docs(ActionRow): fix deprecated message (#10130)
docs(ActionRow): fix deprecated link

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-23 00:37:43 +00:00
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
Danial Raza
e9d654772d docs(ApplicationCommandPermissionsManager): remove incorrect comment (#10123)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-17 18:03:33 +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
iCrawl
ae57d7facb chore: deps 2024-02-06 01:53:30 +01:00
Jiralite
3755e66d41 fix(resolveColor): Address case for numbers (#10115)
fix(resolveColor): address case for numbers

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-05 22:11:41 +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
Jiralite
d4472f85a5 refactor(resolveColor): Prioritise number type check (#10116)
* refactor(resolveColor): prioritise number type check

* refactor: prefer `!Number.isInteger()`

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-03 21:42:16 +00:00
Jiralite
b16647e6cc fix(BaseClient): Fall back to userAgentAppendix (#10113)
fix(BaseClient): fall back to `Options.userAgentAppendix`
2024-02-02 16:32:18 +00:00
Jiralite
fc1f8ae374 refactor(Messages): Improve ColorConvert error (#10108)
* feat(Messages): improve `ColorConvert` error

* style(Util): consistency
2024-01-30 07:17:45 +00:00
Jacob Morrison
fed7f341be Skip sweeping if the guild is not available (#10070)
* Skip sweeping if the guild is not available

* Typo

* Fix formatting

* Fix lint

* Check  if key in guild

* Bwck to guild a ailable

---------

Co-authored-by: Jake Morrison <jake.morrison@pinnsg.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-22 13:17:23 +00:00
Danial Raza
f48787eef1 docs(BaseInteraction): correct return type of member (#10096) 2024-01-22 11:40:13 +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
codershiba
7b8e0debeb refactor(formatters): Add support for object and name param in formatEmoji() (#10076)
* feat: add support for name param and object in `formatEmoji()`

* Update formatters.ts

* refactor: swap priority

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-01-13 11:02:41 +00:00
Renegade334
4824ac154d docs(ThreadMember): fix docblock async return type (#10058) 2023-12-28 12:24:30 +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
8ace6face8 docs(CategoryCreateChannelOptions): Update reference (#10031)
docs(CategoryCreateChannelOptions): update reference

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-05 19:26:27 +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
Danial Raza
62e31cb9ee fix(InteractionResponses): check if ephemeral message flag is used (#10021) 2023-12-04 20:16:26 +00:00
Ryan Munro
941642ad2f fix: replace internal calls to Emoji#url (#10025) 2023-12-03 22:53:02 +00:00
Danial Raza
b992019a78 docs(PermissionOverwriteManager): PermissionsFlagsBit typo (#10004)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-12-01 20:58:21 +00: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
Qjuh
57c414be21 fix(website): discord-api-types links, URL links and some minor doc issues (#9990)
* fix(website): correctly link to discord-api-types in link tags

* fix: url links and some minor doc issues

* fix: unneeded import

* fix: another unneccessary import

* fix: several linting issues

* refactor: simplify ApiItemLike interface

* refactor: apply suggestions

* fix: missing newline in docComment

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-22 08:26:43 +00:00
iCrawl
8f432400d8 build: multi-config build and dep update 2023-11-14 01:26:22 +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
1e4ef35436 docs: use preferred nullable syntax (?T over T | null) (#9946)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 21:45:02 +00:00
Almeida
cc07a28f12 fix(Emoji): id set as undefined edge case (#9953) 2023-11-12 21:34:24 +00:00
Jiralite
f93abf7e35 fix(BaseClient): Default in objects properly (#9952)
fix(BaseClient): default in objects properly
2023-11-12 21:14:09 +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
Jiralite
b5e23ec2ec fix(Client): Ensure destroyed connections are not ready (#9942)
* fix(Client): ensure destroyed connections are not ready

* refactor(Client): prefer `!`

Co-authored-by: Aura <kyradiscord@gmail.com>

---------

Co-authored-by: Aura <kyradiscord@gmail.com>
2023-11-12 16:06:42 +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
iCrawl
6b9f906b03 chore: properly rename folder 2023-11-08 00:44:39 +01:00
Jaw0r3k
c2349d4be4 feat(cleanContent): add slash commands and emojis (#9809)
* feat(cleanContent): add missing commands and emojis

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>

* fix: check for every possible name

* fix: use non capturing group

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-05 18:36:16 +00:00
Aura Román
31d914e44b fix(Webhook): do not call client.deleteWebhook in delete (#9786)
* fix(Webhook): do not call `client.deleteWebhook` in `delete`

Partially reverts #9777 which caused a regression (#9785) when using `WebhookClient`

* chore: add comment

Co-Authored-By: Souji <timoqueezle@gmail.com>

* fix: move `deleteWebhook` from `Client` to `BaseClient`

---------

Co-authored-by: Souji <timoqueezle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-05 18:23:32 +00:00
Jiralite
b6c762cb84 feat(Emoji): Add imageURL() (#9788)
feat(Emoji): add `imageURL()`
2023-11-05 18:01:45 +00:00
dank
85a78f96d4 docs(Message): remove duplicated word 'of' in description (#9923)
fix(Message): remove duplicated word 'of' in description

This commit removes the secondary 'of' in the description for the Message structure. This doesn't change anything drastically in terms of the actual code as it's just a JSDoc comment.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-04 22:47:52 +00:00
Synbulat Biishev
85753a9d6f fix(GuildManager#fetch): inject shard id (#9921) 2023-11-04 22:43:11 +00:00
Renegade334
0e0b85b766 fix: prevent 'undefined' debug message on intentional shard closure (#9846)
* style: prevent 'undefined' debug message on intentional shard closure

addresses #9594

* refactor(WebSocketManager#destroy): improve debug messaging

cleaner stacktrace format
gracefully closing shards will display an appropriate debug `reason`

* style: unresumable debug messaging

---------

Co-authored-by: Almeida <almeidx@pm.me>
2023-10-21 13:53:41 +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
Bartek Szopka
e38d03fbe7 docs(GuildMember): clarify display color (#9891) 2023-10-17 15:52:31 +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
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
Jiralite
44a3cbf39e docs: Consolidate API types (#9881)
docs: deduplicate API types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-10 13:22:02 +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