Compare commits

...

5083 Commits

Author SHA1 Message Date
Vlad Frangu
d92695cdd6 chore: brother why 2024-05-04 20:50:15 +03:00
Vlad Frangu
1d27b3bde0 chore: fix duplicated discord.js changelog 2024-05-04 20:50:15 +03:00
Vlad Frangu
903a7d3404 chore: fix duplicated voice changelog 2024-05-04 20:50:15 +03:00
Vlad Frangu
840dc565cd chore: update templates for create-discord-bot 2024-05-04 20:50:15 +03:00
Vlad Frangu
a84086194e chore(discord.js): release discord.js@14.15.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
b66c067dd7 chore(core): release @discordjs/core@1.2.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
e9d560f128 chore(ws): release @discordjs/ws@1.1.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
6f986886c5 chore(proxy): release @discordjs/proxy@2.1.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
7b913b674f chore(rest): release @discordjs/rest@2.3.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
7dc51aa935 chore(builders): release @discordjs/builders@1.8.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
16df4f3c38 chore(voice): release @discordjs/voice@0.17.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
6239f24f19 chore(util): release @discordjs/util@1.1.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
92501ae343 chore(formatters): release @discordjs/formatters@0.4.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
35f2b3a8c9 chore(create-discord-bot): release create-discord-bot@0.3.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
23ed447ec2 chore(collection): release @discordjs/collection@2.1.0 2024-05-04 20:50:15 +03:00
Vlad Frangu
5d61197ca3 chore(brokers): release @discordjs/brokers@0.3.0 2024-05-04 20:50:15 +03:00
Almeida
a6b9f1b37e fix(Message): not crosspostable if has a poll (#10246) 2024-05-04 16:21:04 +00:00
Jacob Morrison
cb961f5be3 types: add Poll to Message (#10245)
* Add poll to message type

* Add poll to message type without whitespace changes
2024-05-04 16:06:16 +00:00
codershiba
96169add6d docs: Remove duplicate word in comment (#10244)
* fix: Remove duplicate word in comment

* Update README.md

not part of the typo

---------

Co-authored-by: Souji <timoqueezle@gmail.com>
2024-05-04 08:33:24 +00:00
DD
728164ed86 feat(ws): support for custom worker messaging (#10241) 2024-05-03 14:53:09 +00:00
Almeida
6cf094c282 feat(MessageManager): poll methods (#10239)
* feat(MessageManager): poll methods

* docs: wording

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-05-02 20:54:00 +00:00
Almeida
997887069a feat: consumable entitlements (#10235)
* feat: consumable entitlements

* feat: move logic to EntitlementManager

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-05-01 17:57:25 +00:00
Almeida
a1aeaeb9d8 feat: polls (#10185)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-30 23:21:07 +00:00
Almeida
c7adce351a build: bump discord-api-types to 0.37.83 (#10238)
build: bump discord-api-types to 0.37.82
2024-04-30 23:04:00 +00:00
Parbez
7ea3638dbc fix: don't mutate user provided array (#10014)
* fix(builders): don't mutate user provided array

* test: add normalize array tests

* chore: revert vscode autochange

* Update util.test.ts

* refactor: remove unnecessary clone

---------

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <github@almeidx.dev>
2024-04-30 20:46:21 +00:00
DD
798f28cb9b fix(actions): always emit message create for own messages (#10211)
* fix(actions): always emit message create for own messages

* fix: don't re-cache

* fix: user can be missing

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-27 22:37:16 +00:00
Synbulat Biishev
14f9ff7412 chore: Add funding field to package.json (#10230)
* chore: funding

* chore: one more package.json

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-27 17:26:11 +00:00
Almeida
c2e68ceaad build: bump discord-api-types to 0.37.82 (#10226)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-27 17:16:20 +00:00
Almeida
dc8f14967c test: skip flaky rest test (#10234) 2024-04-27 19:11:03 +02:00
Qjuh
b79b7068e9 fix(api-extractor-model): resolve doc reference for classes with merged interfaces (#10225)
fix(api-extractor-model): resolve doc reference with merged interfaces
2024-04-27 16:35:25 +02:00
Synbulat Biishev
dae897bd09 ci: optimize tests (#10231)
chore: optimize tests
2024-04-27 16:34:58 +02:00
Jacob Morrison
4ad285804b perf(Presence): prefer boolean client status comparison before activity checks (#10213)
Prefer boolean client status comparison before activity checks

Co-authored-by: Jacob Morrison <jake@matchmd.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-20 23:08:26 +00:00
iCrawl
6759f5b9c5 chore: deps 2024-04-16 21:44:21 +02:00
Qjuh
c6721d9aa7 fix(api-extractor): link class in docs if interface merging happened (#10217) 2024-04-16 21:34:43 +02:00
Qjuh
1c5de21a29 feat(api-extractor): support export * as ___ syntax (#10173)
* feat(api-extractor): support `export * as ___` syntax

* fix: typescript version
2024-04-16 08:35:34 +00:00
Qjuh
7baa9e4333 feat(website): add type field to search index to sort by (#10212) 2024-04-14 19:53:16 +02:00
Qjuh
afb97fbd00 fix(website): use correct version for cross-package links (#10193) 2024-04-11 17:38:04 +02:00
Qjuh
7dc5bdfef5 ci: fix call to generateSplitDocumentation if run on tag (#10209)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-10 16:27:20 +00:00
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
Jiralite
464d627f1d ci: Ensure reviews in progress label do not merge (#10208)
ci: ensure reviews do not merge
2024-04-07 23:09:39 +02:00
Almeida
bfc3b100da feat(GuildsAPI): bulk ban users (#10202)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-06 07:24:16 +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
avoidaway
26af3868a5 docs: remove duplicated words (#10178)
chore: remove repetitive words

Signed-off-by: avoidaway <cmoman@126.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-04 19:29:34 +00:00
codershiba
b6bdd578b9 feat(GuildBanManager): Add bulkCreate() method (#10182) 2024-04-02 19:38:48 +00:00
Almeida
ba6476d07e build: bump discord-api-types to 0.37.78 (#10201) 2024-04-01 17:55:45 +00:00
Qjuh
980a2b71c7 types: generic for Webhook type (#10188)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-03-31 14:15:21 +00:00
Qjuh
654f1a48b9 chore: remove ws dependency (#10180) 2024-03-31 14:09:38 +00:00
LeCarbonator
a1a3a95c94 feat: allow RestOrArray for command option builders (#10175)
* feat(builders): allow RestOrArray for command option builders

change ApplicationCommandOption methods to allow both rest and array params,
which previously wasn't consistent with other builders.

* chore: merge imports

---------

Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-03-24 18:12:05 +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
cobalt
6cc5fa28e6 fix(types): Export ReadonlyCollection (#10184) 2024-03-20 13:10:34 +00:00
iCrawl
93c174bc82 chore: fix test type import 2024-03-11 18:15:21 +01:00
iCrawl
0d4c26ba4c chore: deps 2024-03-11 17:50:39 +01:00
Qjuh
5f2095b76c ci: use correct github tag in docs source links (#10163)
* ci: use correct github tag in docs source links

* fix: also apply on new tags
2024-03-09 13:52:38 +01:00
Superchupu
a66fc65742 ci: enable npm provenance (#10164)
* chore: enable npm provenance

* chore: do the same for dev releases

* chore: actually enable it in normal releases

* chore: specify provenance in `package.json`

* chore: remove `publishConfig` from api-extractor-utils as it's `private`
2024-03-04 21:11:32 +00:00
Qjuh
a1010c61f5 types: fix duplicate props in merged interfaces (#10160)
types(discord.js): fix duplicate props in merged interfaces
2024-03-04 11:55:01 +01:00
Superchupu
8de8371204 chore(gitattributes): mark pnpm-lock.yaml as generated (#10159) 2024-03-04 00:15:47 +01:00
iCrawl
0efd1bea46 fix: anchor link for events 2024-03-04 00:02:52 +01:00
iCrawl
9fa115df86 fix: can't use node internals on edge 2024-03-03 02:36:06 +01:00
iCrawl
79fbda3aac feat: local and preview detection 2024-03-03 02:30:08 +01:00
iCrawl
2848591e21 fix: switch out syntax highlighter themes 2024-03-03 00:54:47 +01:00
iCrawl
3fd36f745f ci: remove debug logging 2024-03-02 22:26:09 +01:00
iCrawl
34936a0312 chore: never cache doc generation 2024-03-02 22:21:48 +01:00
iCrawl
e401841f63 ci: more logging 2024-03-02 22:14:02 +01:00
iCrawl
d6bf0fe43e ci: logging for ci 2024-03-02 21:52:10 +01:00
iCrawl
59f4db3e1d ci: update split upload 2024-03-02 21:19:13 +01:00
iCrawl
71bba547b6 refactor: docs ordering 2024-03-02 20:25:51 +01:00
Noel
18cce83d80 refactor: docs (#10126) 2024-02-29 04:37:52 +01:00
cobalt
0f9017ef95 fix(Faces): Escape backslash in Shrug (#10156)
* fix(Faces): Escape backslash in `Shrug`

* Update formatters.ts

* Update formatters.ts

* Update formatters.test.ts
2024-02-27 17:23:31 +00:00
Jiralite
efa3cac6f2 types: Update accessibility modifiers on constructors (#10147)
types: update accessibility modifiers on constructors
2024-02-23 12:51:13 +00:00
Synbulat Biishev
bfbd62e3e0 types(Builder.from): fix wrong types (#10071)
* types(Builder.from): fix wrong types

* test: add tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-23 11:54:41 +00:00
Almeida
c8bbdb70f2 fix(ReadonlyCollection): omit clear method (#10148)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-23 09:02:24 +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
bcd4c2cb23 types: use readonly array / collection types for user input (#10045)
* types: use readonly arrays

* chore: check on interface properties

* chore: ReadonlyCollection

* chore: exclude EventEmitter methods

* chore: resolve false positive
2024-02-23 00:29:06 +00:00
Jiralite
8c2ababa78 feat(guild): Add with_counts to getting guilds (#10143)
* feat(guild): add get with counts

* refactor: simplify `query`

Co-authored-by: Almeida <almeidx@pm.me>

---------

Co-authored-by: Almeida <almeidx@pm.me>
2024-02-21 21:52:26 +00:00
Danial Raza
1d565443b0 refactor: improve structure validation with zod (#10103)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-21 20:19:43 +00:00
Matt Rubin
906ade9cc5 refactor(oauth2): remove unnecessary dependency on 'node:url' (#10141)
This change fixes a runtime error when using '@discordjs/core/http-only' on Cloudflare Workers.
2024-02-21 20:15:26 +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
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
Qjuh
ce6b2b74bc fix(docs): remove spaces in type parameter brackets (#10127)
* fix(docs): remove spaces in type parameter brackets

* fix: missing global flag
2024-02-11 18:59:03 +01:00
Qjuh
36db77f107 fix(docs): use ts types for inherited properties instead of jsdoc (#10125)
* fix(docs): use ts types for inherited properties instead of jsdoc

* fix(docs): remove spaces in type parameters
2024-02-10 21:36:25 +01:00
iCrawl
597340f288 docs: split docs.api.json into multiple json files 2024-02-06 17:24:18 +01: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
DD
c878b65ef5 refactor(WebSocketShard): payload sending (#10098)
* refactor(WebSocketShard): payload sending

* fix: adjust ratelimit state onopen

* fix: use >=

* chore: spelling

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>
2024-02-05 18:42:33 +00:00
Suneet Tipirneni
f401cff3f4 fix: Correct testing local changes in CONTRIBUTING.md (#10066)
fix: remove unneeded step for testing local changes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-04 20:11:36 +00:00
brynpttrsn
bff1caebd1 fix(website): move function header into switcher (#10077)
fix(website): move header into switcher
2024-02-04 21:06:50 +01:00
Qjuh
ef83bc3e41 fix(api-extractor): link to enum types on inherited properties (#10085)
* fix: link to enum types on inherited properties

* fix: `undefined` in properties without access modifier
2024-02-04 21:06:03 +01:00
Qjuh
bc9b487eb1 fix(website): always link in TypeAlias (#10105)
* fix(website): always link in TypeAlias

* fix: use div instead span for DocParagraph
2024-02-04 00:39:00 +00:00
brynpttrsn
56943a72f4 fix(website): resolve linkTags in meta description (#10088)
* fix(website): resolve linkTags in summaries

* fix: case body as block

* fix: add discord-api-types support

* fix: remove urlDestination when undefined

* fix: breaks to if/else

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-03 22:10:28 +00:00
Vinayak Kulkarni
9f8d7fe7b4 build: Update husky to v9 (#10102)
* refactor(dev-deps): migrate to husky v9

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>

* revert: only core committers in package.json

* chore: remove hashbang 🎉

* chore: remove install from prepare script 

* chore: upgrade to latest minor

---------

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-03 22:06:19 +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
brynpttrsn
f69165883f fix(website): cmdk duplicate values (#10100)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-03 21:45:28 +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
DD
278396e815 feat(REST): dynamic rate limit offsets (#10099)
* feat(REST): dynamic rate limit offsets

* chore: update tests

* chore: better doc comment

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

* fix: don't overlook globalReset

Co-authored-by: ckohen <chaikohen@gmail.com>

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-30 09:29:42 +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
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
Qjuh
a0c83a254c refactor: make builders types great again (#10026)
* refactor: make builders types great again

* fix: subcommands only type

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-22 15:02:34 +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
Qjuh
1431c18769 fix(website): search hanging on complex types (#10095) 2024-01-21 17:08:31 +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
James
7e12bee337 docs: remove utf-8-validate (#10059)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-13 11:10:10 +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
Jiralite
136c66c213 build: Bump versions (#9986)
fix: bump versions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-30 18:03:00 +00:00
Danial Raza
ce84d3efee fix(Gateway): Export interface (#10060)
* fix(types): export missing `Gateway` interface

* docs(Gateway): update link to `WebSocketManager`
2023-12-30 17:40:20 +00:00
Renegade334
4824ac154d docs(ThreadMember): fix docblock async return type (#10058) 2023-12-28 12:24:30 +00:00
Almeida
0f1e02b3dd fix(escape*): dont escape urls (#9958)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-24 16:16:33 +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
iCrawl
520d6f64dd fix: nextjs unreliable params in route 2023-12-21 05:19:32 +01:00
iCrawl
1c3211a5fc fix: remove ppr from website for now 2023-12-21 04:39:14 +01:00
iCrawl
891a67ac4d fix: use proper api endpoint 2023-12-20 23:49:39 +01:00
iCrawl
7b5c31b2bc refactor: fetch versions on the client 2023-12-20 23:21:49 +01:00
iCrawl
d869d9b3fe style: fix up lint 2023-12-19 14:45:28 +01:00
iCrawl
171cb182ed chore: deps 2023-12-19 14:33:04 +01: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
Almeida
a000df624c chore: use double quotes for globs in scripts (#10032) 2023-12-18 18:14:15 +01:00
Danial Raza
6cd6e3baaf chore: use string values in vs code settings (#10028) 2023-12-18 18:13:55 +01:00
Qjuh
e43f96cec5 ci: always use the workflows from main branch (#10048) 2023-12-18 18:13:30 +01:00
Danial Raza
461948c07d fix: deprecate underscore in favor of underline (#10054)
* fix: deprecate `underscore` in favor of `underline`

* refactor: use `underline` in `underscore`

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

---------

Co-authored-by: Almeida <github@almeidx.dev>
2023-12-17 20:44:54 +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
18c2dccd0e feat: Utilise create-discord-bot (#10013)
* feat: utilise create-discord-bot

* chore: hide line numbers

* feat: add intents page

* feat: add more Node.js variants

* refactor: redo page a bit

* fix: 👀

* chore: touch up introduction page

* chore: touch up what's new

* chore: touch up how to contribute

* chore: remove enforced locale

* chore: Fix typo

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

* chore: commit suggestions

Co-authored-by: Souji <timoqueezle@gmail.com>

* chore: address improper capitalisation

Co-authored-by: Souji <timoqueezle@gmail.com>

* refactor: remove `applications.commands`

* refactor: remove unique comment

* fix(intents): remove shard comment

* docs(intents): add missing info

---------

Co-authored-by: Danial Raza <danialrazafb@gmail.com>
Co-authored-by: Souji <timoqueezle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-14 21:15:27 +00:00
Qjuh
adfd9cd3b3 refactor: use interfaces for AsyncEventEmitter event maps (#10044)
* refactor: use interfaces for AsyncEventEmitter event maps

* refactor: apply suggestions from code review and add tests

* refactor: better errors on missing dispatch types
2023-12-14 16:09:13 +00:00
Qjuh
f2138bb5a8 ci: always generate docs with latest main ae (#10037) 2023-12-13 14:06:50 +01:00
Qjuh
651ffc2caf feat(website): more builtin docs links (#10030)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-10 14:06:09 +00:00
Vlad Frangu
319ef9a70b feat: use globally available WebSocket client in runtimes that have it (#10042) 2023-12-10 13:42:02 +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
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
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
Jiralite
54453b04e5 chore(uploadDocumentation): Expose full error (#10012)
chore: expose full error

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-12-02 12:50:53 +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
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
Qjuh
b229240731 ci: documentation.yml refactor branch/tag check to one place only (#10008)
* ci: fix documentation manual dispatch run on tag

* ci: move conditional to env var

* fix: spacing
2023-12-01 02:12:36 +01:00
Qjuh
1ec2901f56 feat(website): type parameters on methods and overloads (#9998)
* feat(website): type parameters on methods and overloads

* refactor: add collapsible parameter list
2023-12-01 02:11:59 +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
brynpttrsn
cbbbfb9823 fix(website): serialize methods with overload index (#10005)
fix: add overload index to methods
2023-11-30 22:43:43 +01:00
Qjuh
fe90487974 ci: fix documentation manual dispatch run on tag (#10007) 2023-11-30 22:41:55 +01:00
Noel
d0aa8d25e2 ci: fix deploy-website 2023-11-24 12:23:31 +01:00
Qjuh
bc2ecef73d fix: cross package links again (#9995) 2023-11-24 12:10:16 +01:00
Qjuh
9fdbf0ad65 fix(website): doc links to other packages (#9994)
* fix(website): doc links to other packages

* fix: missing parameter

* Apply suggestions from code review

Co-authored-by: Almeida <almeidx@pm.me>

---------

Co-authored-by: Almeida <almeidx@pm.me>
2023-11-22 19:06:13 +01: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
Jiralite
e9ff99101b docs: Remove hyphen after @returns (#9989)
docs: remove hyphen after `@returns`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-21 17:16:51 +00:00
Qjuh
3d1c884926 refactor(website): remove unneccessary addPackageToModel function (#9983)
* types: fix links in @deprecated tags

* Merge branch 'main' into fix/deprecated-links-d.ts

* fix: searchIndices

* refactor: apply review suggestions

* refactor: remove addPackageToModel function

* fix: event links in search index

* fix: wrong overload condition
2023-11-21 10:06:13 +01:00
Rahul Mishra
ce0be392d8 fix(Bun): Fix typo for Bun template (#9987)
fix(create-discord-bot): Fix typo for Bun Template which caused install errors
2023-11-18 16:58:33 +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
5a715706df fix(website): search index generation (#9980)
* types: fix links in @deprecated tags

* Merge branch 'main' into fix/deprecated-links-d.ts

* fix: searchIndices

* refactor: apply review suggestions
2023-11-18 10:44:06 +00:00
Vlad Frangu
ae58053dc8 chore: release @discordjs/rest@2.2.0 & @discordjs/core@1.1.1 (#9978)
* chore(rest): release @discordjs/rest@2.2.0

* chore(core): release @discordjs/core@1.1.1

* chore: at this point might as well hand write
2023-11-18 00:01:40 +00:00
Jiralite
5da5be2bc9 fix(route): Conditionally prefix package names (#9975)
fix(route): conditionally prefix package names
2023-11-17 23:38:49 +01:00
Noel
55be1c901a ci: properly extract name from minified docs files 2023-11-17 23:37:14 +01:00
Qjuh
492f86af39 refactor: minify api.json by shortening keys (#9971)
* 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
2023-11-17 23:26:48 +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
Vlad Frangu
6df233de14 feat: present x-ratelimit-scope for 429s hit (#9973)
* feat: present x-ratelimit-scope for 429s hit

* fix: get scope from headers for burst too
2023-11-16 10:49:05 +00:00
Qjuh
0aa7dc1b86 fix: replace Object< with Record< (#9970) 2023-11-15 20:20:21 +01:00
Qjuh
cab60142ff fix: type mapping for docgen methods/props (#9969)
* fix: minify mainlib docs json

* fix: minify them all

* fix: type mapping for docgen methods/props
2023-11-14 20:54:29 +00:00
Qjuh
4b88306dcb fix: minify mainlib docs json (#9963)
* fix: minify mainlib docs json

* fix: minify them all
2023-11-14 09:13:28 +01:00
iCrawl
f9177be61b fix: don't hardcode discordjs special case 2023-11-14 02:04:02 +01:00
iCrawl
75137bac6f refactor: don't prebuild on preview builds 2023-11-14 01:55:08 +01:00
iCrawl
00063912ee fix: conflict resolution 2023-11-14 01:35:08 +01:00
iCrawl
8f432400d8 build: multi-config build and dep update 2023-11-14 01:26:22 +01:00
iCrawl
75fc7f2454 ci: include secret 2023-11-13 23:21:35 +01:00
iCrawl
01c63d2e0f refactor: switch to vercel blob for docs 2023-11-13 23:15:16 +01:00
iCrawl
ffc3ea5c3f fix: hardcode redirect for main lib for now 2023-11-13 21:37:59 +01:00
iCrawl
1d2d01e1f5 ci: dont set the ci to failed on fail to upload docs 2023-11-13 21:31:46 +01:00
iCrawl
0063dae43b fix: use correct pkg variable 2023-11-13 21:30:05 +01:00
iCrawl
69c949ab28 fix: properly switch versions 2023-11-13 21:17:42 +01:00
iCrawl
25d552b318 fix: missing on conflict clause 2023-11-13 21:09:43 +01:00
iCrawl
c4767bacde refactor: switch to vercel pg 2023-11-13 21:07:01 +01:00
iCrawl
9a8110047e fix: cache nextjs cache output with turbo 2023-11-13 19:55:08 +01:00
iCrawl
d4ebc369ca fix: dont cache nextjs cache 2023-11-13 19:31:55 +01:00
iCrawl
b150d4ac27 fix: provide full path for pre-gen 2023-11-13 19:19:26 +01:00
iCrawl
81a892e27f fix: properly create index 2023-11-13 19:13:32 +01:00
iCrawl
bc8f83368a feat: reintroduce outline navigation 2023-11-13 18:03:23 +01:00
Qjuh
7c935dc84b feat: docs for mixin methods, examples (#9960) 2023-11-13 15:03:47 +01:00
iCrawl
8d04cbc203 chore: add loading page for suspense 2023-11-13 11:23:59 +01:00
iCrawl
356cadb382 chore: enable prefetch 2023-11-13 11:07:47 +01:00
iCrawl
978a39f6d3 chore: disable prefetch 2023-11-13 10:48:51 +01:00
iCrawl
516be87a87 fix: properly display all versions in selector 2023-11-13 10:22:44 +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
iCrawl
2d63d93558 ci: add readmes to build output for cache 2023-11-13 00:17:43 +01:00
iCrawl
b305194841 ci: revert deploying vercel with ci for now 2023-11-13 00:12:37 +01:00
Vlad Frangu
2550c7931d chore(discord.js): release discord.js@14.14.1 (#9957)
* chore(discord.js): release discord.js@14.14.1

* chore: actual changelog
2023-11-12 22:06:14 +00: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
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
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
Jiralite
f0ec70dfda feat: bump package versions (#9951)
* feat: bump package versions

* chore(create-discord-bot): release create-discord-bot@0.2.3

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-11-12 20:22:55 +00:00
Jaw0r3k
8a6045f600 fix: import picocolors as default (#9949) 2023-11-12 19:39:08 +00:00
Vlad Frangu
418032ae1f chore(ci): fix release workflow (#9947) 2023-11-12 19:12:13 +00:00
Vlad Frangu
dbb92e5bc4 chore(releases): release party (#9943)
* chore(brokers): release @discordjs/brokers@0.2.3

* chore(collection): release @discordjs/collection@2.0.0

* chore(formatters): release @discordjs/formatters@0.4.0

* chore(util): release @discordjs/util@1.0.2

* chore(voice): release @discordjs/voice@0.16.1

* chore(builders): release @discordjs/builders@1.7.0

* chore(rest): release @discordjs/rest@2.1.0

* chore(proxy): release @discordjs/proxy@2.0.2

* chore(ws): release @discordjs/ws@1.0.2

* chore(core): release @discordjs/core@1.1.0

* chore(discord.js): release discord.js@14.14.0

* chore: small borked changelogs

* chore(create-discord-bot): release create-discord-bot@0.2.2

* chore: bork

* chore: fix wrong bump

* chore: git cliff pls
2023-11-12 18:11:58 +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
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
Vlad Frangu
81e7866903 feat: expose Retry-After and sublimit timeouts in RatelimitData (#9864)
* feat: expose Retry-After and sublimit timeouts in RatelimitData

* chore: better docs?

* Apply suggestions from code review

Co-authored-by: ckohen <chaikohen@gmail.com>

---------

Co-authored-by: ckohen <chaikohen@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 14:36:12 +00:00
iCrawl
62e6573296 fix(website): caching and revalidation 2023-11-11 21:05:25 +01:00
David Malchin
cf49f405b0 fix(REST): strip webhook tokens (#9723)
* fix(REST): strip webhook tokens

* fix(REST): implement requested changes

Co-authored-by: ckohen <chaikohen@gmail.com>

---------

Co-authored-by: ckohen <chaikohen@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-11 18:31:39 +00:00
iCrawl
2a25eeaf13 chore: remove nextjs patch 2023-11-11 19:19:14 +01:00
Qjuh
5a4c9755c3 feat(api-extractor): replace type parameters with their actual values on inherited members (#9939)
* refactor: use tokenRange for typeParams in heritage

* fix: correct type param replacement
2023-11-11 15:18:08 +01: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
Almeida
d28814d869 fix: properly support multiple extends/implements (#9934)
* fix: properly support multiple extends/implements

* refactor: use flexbox instead of space util

Co-authored-by: Noel <buechler.noel@outlook.com>

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-10 22:01:30 +00:00
Almeida
ff24bc5729 build: rerun docs scripts on changes to api-extractor packages (#9935)
* build: rerun docs scripts on changes to api-extractor-*

* refactor: requested changes

Co-authored-by: Noel <buechler.noel@outlook.com>

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-10 17:42:55 +00:00
Almeida
81334a2a2c feat: link basic types to MDN/TS documentation (#9913)
* feat: link basic types to MDN/TS documentation

* refactor: requested changes
2023-11-10 14:50:25 +00:00
Almeida
6dca8013af chore: remove parameter list from events (#9933) 2023-11-09 00:38:13 +01:00
Suneet Tipirneni
a87b267fba fix: treat primitives as references instead of content (#9932)
* fix: treat primitives as references instead of content

* chore: add typeof keyword

* fix: add missing keywords
2023-11-09 00:37:50 +01:00
iCrawl
aad82f088b build: fix the messy dependency graph 2023-11-09 00:13:01 +01:00
iCrawl
e5f3f3130e fix: path generation for search 2023-11-08 19:01:32 +01:00
iCrawl
4a5e9fc1de fix: pin source-map dependency and clean up website 2023-11-08 18:43:02 +01:00
iCrawl
e72b552ae2 chore: remaining deps and lighthouse removal 2023-11-08 18:20:16 +01:00
iCrawl
34d0224b68 refactor: display readme correctly 2023-11-08 14:49:28 +01:00
iCrawl
fcfe5cf142 refactor: remove banner 2023-11-08 13:51:51 +01:00
iCrawl
fb2e7a0aac ci: correctly apply permissions 2023-11-08 13:36:55 +01:00
iCrawl
4575e49ea1 ci: deploy on vercel again 2023-11-08 13:27:04 +01:00
iCrawl
2bda883a0f fix: handle older generated docs better 2023-11-08 12:30:32 +01:00
Almeida
fffe70a039 feat(Client): AsyncIterator-returning method for fetching members (#9771)
* feat(Client): AsyncIterator-returning method for fetching members

* fix: requested changes

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-11-08 10:43:15 +00:00
iCrawl
413d6d67c5 ci: separate website deploy 2023-11-08 10:38:44 +01: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
f713e47b0a fix: gracefully handle no docs 2023-11-08 03:23:51 +01:00
Neutron
defeee5eec feat: return entries instead of values in toJSON method (#9345)
* feat(collection): return entries instead of values in toJSON method

* test: adjust test

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-08 01:28:27 +00:00
iCrawl
67a2538b4d fix: handle errors gracefully 2023-11-08 02:22:51 +01:00
iCrawl
7208d69c05 ci: rename github deployment env 2023-11-08 02:04:22 +01:00
iCrawl
6b9f906b03 chore: properly rename folder 2023-11-08 00:44:39 +01:00
iCrawl
347df4e083 chore: typo 2023-11-08 00:38:35 +01:00
iCrawl
ee2afb0aae chore: update engine field in packages & deploy website manually 2023-11-08 00:25:38 +01:00
Qjuh
5c0fad3b2d build: package api-extractor and -model (#9920)
* 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

* fix: cpy-cli & pnpm-lock

* fix: increase icon size

* fix: icon size again
2023-11-07 21:53:36 +01:00
Almeida
95c0b1a59f chore: pin @discordjs/collection version in discord.js (#9929) 2023-11-07 19:32:04 +01:00
Almeida
65966ae6ec feat: align some methods with the Change By Copy proposal (#9207)
BREAKING CHANGE: The `sorted` method has been renamed to `toSorted`
2023-11-07 18:26:48 +00:00
Almeida
3b8df63a5a feat: align some methods with the Set Methods proposal (#8890)
feat(collection): align/add methods with/from Set Methods proposal

BREAKING CHANGE: The `intersect` method has been renamed to `intersection`
BREAKING CHANGE: The `difference` method has been renamed to `symmetricDifference`
BREAKING CHANGE: The `subtract` method has been renamed to `difference`
2023-11-07 18:04:51 +00:00
Jaw0r3k
054eaec7d7 fix: update broken links (#9926)
fix: update some links

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-11-07 17:51:10 +00:00
iCrawl
c8227ca533 build(scripts): send correct data to meilisearch 2023-11-07 16:48:02 +01:00
iCrawl
1eee9dc257 build(scripts): use correct env vars 2023-11-07 16:44:08 +01:00
iCrawl
6a6c4bdcae build: make sure to cache bust tsup config changes in all packages 2023-11-07 16:41:15 +01:00
iCrawl
c39c94374a ci: fix building upload search indicies action 2023-11-07 16:27:07 +01:00
iCrawl
792840bae6 ci: update search with github actions 2023-11-07 16:22:17 +01:00
iCrawl
009c0a3bae refactor: use planetscale instead of custom api 2023-11-07 15:08:03 +01:00
iCrawl
344a3f9344 chore: @types/node and unocss fix 2023-11-06 23:55:13 +01:00
iCrawl
a1abc6b273 chore: fixup eslint 2023-11-06 22:29:20 +01:00
iCrawl
4f4dde2a09 chore: regen pnpm lock and patch itemLink component 2023-11-06 22:17:07 +01:00
iCrawl
0ca0254d83 chore: upgrade to nextjs canary 2023-11-06 21:49:58 +01:00
iCrawl
6cd3adf030 chore: update deps 2023-11-06 21:38:45 +01:00
Jacob Morrison
637e1a4ddb refactor: Move getNode/canEnableFFmpegOptimizations into a lazy loaded call (#9918)
* Move the getNode/canEnableFFMPEGOptimizations into a lazy loaded call the first time it's actually ever referenced

* PR feedback: Make initializeNodes return a map then nullably assign NODES, this removes an extra variable and cleans up the code

* chore: lint suggestion

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

* Use local map instead of recursive

* Run prettier

* Fix lint

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-06 09:17:19 +00:00
Jaw0r3k
ac645084f0 feat: support findLast and reduceRight methods (#9573)
* feat(collection): findLast and reverseRight

* chore(collection): performance and tests change

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

* remove unnecessary code

* Update packages/collection/src/collection.ts

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

* Apply suggestions from code review

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

---------

Co-authored-by: kyra <kyradiscord@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-11-05 18:49:53 +00:00
Kin
c051ed9427 feat: add guild member (#9877)
* feat: add guild member

* slightly change the description for the guildId and userId parameters in the addMember function

* fix description syntax

* Update packages/core/src/api/guild.ts

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

* add jsdoc for options param

* fix formatting

* add missed semicolon

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

* style: prettier

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-05 18:42:17 +00: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
Almeida
efbcda70fc docs: remove markdown (#9914)
docs(formatters): remove markdown

The documentation website does not support rendering markdown

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-05 18:18:23 +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
Jiralite
a9e1f6026c fix: Add extension (#9900)
fix: add extension
2023-11-01 16:10:15 +01:00
Almeida
e80194e3fb build: bump discord-api-types (#9908) 2023-10-23 13:09:35 +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
Jiralite
5b4a51945c build: Bump dependencies (#9899)
build: bump dependencies

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-17 20:47:47 +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
e307581442 ci(labels): Use strings in values (#9883)
ci: quote needed `color`s
2023-10-17 18:16:57 +02:00
Jiralite
77be0f0f2d build: Fix create-package script (#9882)
build: fix create-package script
2023-10-17 18:16:21 +02:00
Bartek Szopka
e38d03fbe7 docs(GuildMember): clarify display color (#9891) 2023-10-17 15:52:31 +00:00
Nick
6a63c441fe fix: forward x-audit-log-reason header (#9889)
fix(proxy): forward x-audit-log-reason header
2023-10-16 05:10:19 +00:00
synicalsyntax
8964504d07 fix(website): generate right dapi-types URLs for enum members (#9865)
Fixes #9780

Co-authored-by: syn <hi@syn.gay>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-10-14 19:54:11 +00:00
Jiralite
7276e7c4b7 build: Fix search_indices script (#9869)
build: fix search_indicies script

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-10 14:14:41 +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
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
Jiralite
332b624aed docs(stickers): Reveal link in the website (#9870)
docs(stickers): reveal link

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-10 13:19:52 +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
ec47e72b41 ci: Use non-deprecated output parameters (#9878)
ci: update to output parameters
2023-10-07 23:35:11 +02:00
Jiralite
e1edba17c4 build: Bump discord-api-types to 0.37.60 (#9876)
build: bump discord-api-types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-07 16:17:12 +00:00
Vlad Frangu
0529b2af95 fix(Role): calculate position correctly when rawPositions are equal (#9871)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-07 16:14:22 +00:00
Eray
f58628385c fix: update module to NodeNext in tsconfig.json (#9875)
an error was occurring due to the module resolution :3
2023-10-07 16:07:16 +00:00
Jiralite
a674989fe2 docs(collection): Minor article additions (#9868)
docs(collection): add articles
2023-10-04 04:43:23 +00:00
Jiralite
cd987b592b chore: No identifier base in development versions (#9848)
feat: no identifier base in development versions
2023-10-03 19:24:13 +00:00
Jiralite
ec63818bcf build: Disable import/extensions (#9849)
build: update eslint-config-neon
2023-10-03 21:01:31 +02:00
Jiralite
3e516e6e9b build: Bump discord-api-types to 0.37.59 (#9854)
build: bump discord-api-types
2023-10-03 20:06:22 +02:00
Jaw0r3k
5aeb6e1ae6 ci: Disable publishing multiple dev versions under the same commit (#9740)
* chore: disable publishing mutliple versions

Co-authored-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com>

* Update .github/workflows/publish-dev.yml

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

* fix: commit suggestion

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

* chore: add suggested changes

* style: add back line

---------

Co-authored-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-10-03 20:05:22 +02:00
DD
93e5bed87d chore: update license files (#9862) 2023-09-30 00:42:43 +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
eaabcdfda6 docs: Remove FileOptions (#9855)
docs: remove `FileOptions`
2023-09-26 19:44:09 +00:00
Danial Raza
19ea0baa00 refactor(GuildAuditLogsEntry): abstract reduce logic into a new function (#9845) 2023-09-23 22:40:45 +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
ec3bcb93a5 ci(publish-release): Use correct environment variable (#9838)
ci(publish-release): use correct environment variable for pnpm

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-19 17:49:51 +00:00
Jiralite
5a7b5b56ae ci: Deprecate step after publish & standalone file (#9837)
* ci: deprecate step after publish & standalone file

* docs: update contributing file

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-19 17:47:50 +00:00
Almeida
5bdb34b3be docs: remove broken markdown links (#9822)
chore: remove broken markdown links to documentation

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-18 15:24:49 +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
Jaw0r3k
ed14135844 docs(ApplicationCommandManager): id parameter can take options (#9664)
* docs: mention about possible options

* chore: add suggested changes

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-09-17 09:42:36 +00:00
Danial Raza
85b24988a5 docs(Attachment): add MIME types link to contentType (#9824)
* docs(Attachment): add MIME types link to contentType

* docs: don't force locale

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-17 09:37:55 +00:00
Jiralite
7cdfc6c72a ci: Modify environment variable to fix development releases (#9826)
* ci: fix development releases

* build: remove .yarnrc.yml
2023-09-16 21:53:49 +02: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
DD
e68ab167c2 fix(WebSocketManager): available sessions check (#9823)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-10 12:42:38 +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
Jiralite
c50809e206 docs: Fix "its" typo (#9825)
docs: fix "its" typo
2023-09-09 18:20:15 +00:00
Jeremy Rifkin
8d97e2d2c5 docs(GuildMember): Clarify timeout parameter wording (#9800)
* Update GuildMember.js

* Update GuildMember.js

* Update GuildMember.js

* Update GuildMember.js

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-09-08 07:33:09 +00:00
DD
ff1fda7b59 ci: fix npm dev release workflow (#9817)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-02 11:06:54 +00:00
Jiralite
ba31972d86 build: Bump discord-api-types to 0.37.56 (#9815)
build: bump discord-api-types to 0.37.56

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-02 11:04:25 +00:00
Jiralite
778df45166 feat(CDN): Support emoji size (#9787)
* feat(CDN): support emoji size

* refactor: try to warn in all environments

* feat: add prefix

* refactor: better feedback message

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-02 09:56:09 +00:00
Jiralite
23a6424261 docs(ApplicationsAPI): Fix getCurrent() options description (#9816)
docs(ApplicationsAPI): fix `getCurrent()` options description
2023-08-31 18:21:52 +00:00
Colin McDonnell
7157748fe3 docs(create-discord-bot): support bun in create-discord-bot (#9798) 2023-08-28 09:36:26 +02:00
Jiralite
85d03a3000 ci: Stop documentation upload for create-discord-bot (#9781)
ci: stop documentation upload for create-discord-bot
2023-08-28 09:34:38 +02:00
iCrawl
e1ae7b4d57 chore(create-discord-bot): disable eslint rule for ts 2023-08-27 21:08:42 +02:00
Noel
e96a8a977f build: pnpm (#9806) 2023-08-27 20:24:03 +02:00
Jaw0r3k
8325fa6540 feat: Add no-install option (#9604)
* chore: no install option + fix type

* chore: apply suggestions

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

---------

Co-authored-by: Jaw0r3k <jaw0r3k.git@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-08-26 21:31:22 +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
Almeida
566d5e2c81 feat(formatters): add guild navigation mentions (#9436)
* feat(formatters): add guild navigation mentions

* docs: dont force support article locale

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-08-25 12:01:58 +00:00
Danial Raza
0d787e9f79 feat: add new markdown formatters (#9613)
* feat: add new markdown formatters

Co-authored-by: Jaw0r3k <jaw0r3k.g@gmail.com>

* Update packages/formatters/src/formatters.ts

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* refactor: remove unnecessary index tracking and rename 'array' to 'items'

Co-authored-by: Almeida <almeidx@pm.me>

* refactor: rename 'array' to 'items'

Co-authored-by: Almeida <almeidx@pm.me>

* refactor(heading): consolidate heading functions into a single function

Also correct param names from array to items.

Co-authored-by: Jaw0r3k <jaw0r3k.g@gmail.com>

* refactor: add HeadingLevel enum and use switch case

* fix: export HeadingLevel enum

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

* feat(heading): add missing documentation for level parameter

* refactor: update list formatters

* docs: correct heading formatter description

* refactor: update list formatters

* fix(heading): remove unnecessary space

* refactor: move list callback function to outer scope

* test: add tests

* refactor: requested changes

* refactor: suggested changes

* docs: add missing documentation

* style: suggested change

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

* refactor: use math max method instead

Co-authored-by: Almeida <almeidx@pm.me>

---------

Co-authored-by: Jaw0r3k <jaw0r3k.g@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: space <spaceeec@yahoo.com>
2023-08-25 10:06:13 +00:00
Jiralite
50106c77db feat: Implement GET current application (#9797)
* feat: implement current application route

* refactor: pluralisation

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>

---------

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-25 09:33:33 +00:00
iCrawl
22011575cd build: fixup vscode-eslint 2023-08-24 23:44:35 +02:00
iCrawl
e3127a0735 build: fix linting 2023-08-24 23:08:29 +02:00
iCrawl
9811514deb build: ignores/swap/concurrency 2023-08-24 21:58:34 +02:00
iCrawl
6ea63d000b chore: regen lockfile 2023-08-24 20:33:50 +02:00
iCrawl
fb81f7befb build: refactor linting setup 2023-08-24 06:43:23 +02:00
White Wolf
788888ab9a fix(TransformerGraph): Explicitly include input args for readable input cases instead of just for string input cases (#9793)
Explicitly add input args for readable input cases instead of just for string input cases.
Change also ensures that constant arrays are passed by value instead of by reference, preventing them from accidentally being modified.

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-08-23 16:10:22 +00:00
iCrawl
f6c7c14c9e chore: cleanup from debug 2023-08-22 09:48:36 +02:00
iCrawl
d37632da05 build: refactor linting 2023-08-22 09:40:11 +02:00
iCrawl
2e40a05adf chore: fixup exports and move prettier/lintstaged to mjs 2023-08-22 01:58:54 +02:00
iCrawl
1e3aed0d97 chore: config overhaul 2023-08-22 01:33:47 +02:00
iCrawl
5d7c59c301 chore: deps 2023-08-22 00:30:08 +02:00
Jiralite
899bc5f78b build: bump Undici and discord-api-types (#9779)
* build: bump discord-api-types

* build: bump Undici too

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-21 21:00:14 +00:00
Noel
dd5e7453e8 feat(create-discord-bot): bun/deno templates (#9795) 2023-08-21 22:48:13 +02:00
iCrawl
8eb978d32c chore(discord.js): release discord.js@14.13.0 2023-08-17 21:45:00 +02:00
iCrawl
5d1b233047 chore(core): release @discordjs/core@1.0.1 2023-08-17 21:44:09 +02:00
iCrawl
4ab05e994e chore(ws): release @discordjs/ws@1.0.1 2023-08-17 21:43:19 +02:00
iCrawl
4bc2667a5f chore(proxy): release @discordjs/proxy@2.0.1 2023-08-17 21:42:44 +02:00
iCrawl
84ead6e554 chore(rest): release @discordjs/rest@2.0.1 2023-08-17 21:41:52 +02:00
iCrawl
0220fb7278 chore(builders): release @discordjs/builders@1.6.5 2023-08-17 21:40:56 +02:00
iCrawl
6da456767e chore(util): release @discordjs/util@1.0.1 2023-08-17 21:39:49 +02:00
iCrawl
67b30355ea chore(formatters): release @discordjs/formatters@0.3.2 2023-08-17 21:38:59 +02:00
iCrawl
58d9024245 chore(create-discord-bot): release create-discord-bot@0.2.1 2023-08-17 21:38:20 +02:00
iCrawl
5cd6382d1d chore(collection): release @discordjs/collection@1.5.3 2023-08-17 21:35:04 +02:00
iCrawl
fffe625a0c chore(brokers): release @discordjs/brokers@0.2.2 2023-08-17 21:34:23 +02:00
iCrawl
7321c291da chore: revert bump 2023-08-17 21:33:46 +02:00
iCrawl
ab3efb0211 chore(discord.js): release discord.js@14.13.0 2023-08-17 21:31:59 +02:00
iCrawl
7fa9ea3f0f chore: pin discord-api-deps, revert undici 2023-08-17 21:31:04 +02:00
iCrawl
af0f1aa765 chore(discord.js): release discord.js@14.13.0 2023-08-17 21:09:00 +02:00
iCrawl
99cadfd82b chore: deps 2023-08-17 21:08:09 +02:00
Jiralite
8f572a6bad docs(EmbedBuilder): @readonly length (#9778)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-17 19:07:02 +00:00
Jaw0r3k
d90ba8dce8 feat(Client): add deleteWebhook method (#9777)
* feat(Client): deleteWebhook method

* Update packages/discord.js/src/client/Client.js

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

* chore: 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-08-17 16:12:05 +00:00
Jiralite
24fbb11ba2 fix(Action): Do not add the client user as a recipient (#9774)
fix(Action): do not add the client user as a recipient

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-14 17:24:00 +00:00
Jiralite
727dc094d5 types(GuildInvitableChannelResolvable): Allow forum channels (#9775)
types(GuildInvitableChannelResolvable): allow forum channels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-14 17:19:47 +00:00
Jiralite
d5be4242c6 docs(WebhookEditOptions): Add all of the types (#9776)
docs(WebhookEditOptions): add all the types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-14 17:16:24 +00:00
Jiralite
c1ff545bf1 fix(DMChannel): Correct partial typo (#9773)
fix(DMChannel): correct partial typo
2023-08-14 17:11:46 +00:00
Toast
188877c50a docs: Update Node.js requirement to 16.11.0 (#9764)
* Update Node.js requirement in README file

* chore: update the rest of files with nodejs 16.11.0

* Update 03-updating-to-v14.mdx

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-08-13 19:49:33 +00:00
Jiralite
a1605b3a5e build: Update vite and other related dependencies (#9772)
* build: update vite and other related dependencies

* chore: use `"errors-only"`
2023-08-13 21:36:23 +02:00
advaith
9ed1b59df6 feat(ClientPresence): allow setting activity state (#9743)
* feat(ClientPresence): allow setting activity state

* fix: add to map

* feat: use name as fallback state
2023-08-12 11:31:29 +00:00
Jaw0r3k
0a9a3ede29 typings: Make activity name required (#9765)
* fix: activity name is required

* chore: add suggested changes

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

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-08-12 11:12:33 +00:00
ckohen
346fa57f95 fix(CachedManager): allow overriding constructor for makeCache (#9763)
* fix(CachedManager): allow overriding constructor for makeCache

* feat: allow determining makeCache based on non-overriden constructor

* types: cleanup leftovers

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-12 07:08:47 +00:00
Lily Bergonzat
b3c85d34a6 fix(types): fixed CachedManager constructor arguments in type (#9761)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-11 10:04:13 +00:00
Jiralite
d8e37551ce fix(Action): Do not set undefined values (#9755)
fix(Action): do not set `undefined` values

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-11 07:19:59 +00:00
Jiralite
a30d46c5f5 types(BaseButtonComponentData): Narrow component type (#9735)
* types(BaseButtonComponentData): narrow `type`

* test: fix suddenly broken tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-11 07:15:05 +00:00
Jiralite
632a9b4965 feat(ClientApplication): Approximate guild count and new GET route (#9713)
* feat: add approx guild count and get route

* refactor: replace route

* docs: update description of class

The replacement route justifies this change.

* feat(ClientApplication): add `approximateGuildCount`

* refactor: revert now-unnecessary changes
2023-08-11 07:11:13 +00:00
n1ck_pro
3b18e5b08d feat(Role): add flags (#9694)
* feat(Role): add `flags`

* types: use RoleFlags enum

* Update packages/discord.js/typings/index.d.ts

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
2023-08-10 21:20:13 +00:00
Almeida
692f0fc96d feat(Attachment): add flags (#9686)
* feat(Attachment): add `flags`

* fix: import

* fix: flags casing

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-08-10 20:53:54 +00:00
Synbulat Biishev
0de071d0a5 feat: add Client#webhooksUpdate (#9732)
* feat: add `Client#webhooksUpdate`

* feat: add deprecation in the types

* docs: add full stops

* types: reference non-deprecated type

This helps with future-proofing (deduplication).

* docs(ClientEvents): fix reference link

This now hyperlinks correctly with IntelliSense.

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-09 14:15:00 +00:00
Jaw0r3k
99194fc270 fix(create-discord-bot): add shebang in main file (#9747)
* fix: no running in cmd

Co-authored-by: ROB0520 <ynoreyesminecraft@gmail.com>

* chore: delete in create-discord-bot file

---------

Co-authored-by: ROB0520 <ynoreyesminecraft@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-08-09 09:48:58 +00:00
Almeida
cf72d42ea5 ci: upload /formatters test coverage (#9753)
chore: upload /formatters test coverage
2023-08-08 06:44:27 +00:00
iCrawl
7295a3a94a chore(discord.js): release discord.js@14.12.1 2023-08-01 02:23:51 +02:00
n1ck_pro
1af7e5a0bb fix(BaseClient): fix destroy method (#9742) 2023-07-31 22:18:11 +00:00
iCrawl
3bc0dce04a chore: fix changelog 2023-07-31 22:17:37 +02:00
iCrawl
c40f7540cd chore(discord.js): release discord.js@15.0.0 2023-07-31 22:07:38 +02:00
iCrawl
1fc9308fef chore(builders): release @discordjs/builders@1.6.4 2023-07-31 21:35:26 +02:00
iCrawl
43d3b48565 chore(create-discord-bot): release create-discord-bot@0.2.0 2023-07-31 21:33:51 +02:00
iCrawl
8d50f2056d chore(core): release @discordjs/core@1.0.0 2023-07-31 21:30:19 +02:00
iCrawl
acc560204f chore(proxy): release @discordjs/proxy@2.0.0 2023-07-31 21:28:52 +02:00
iCrawl
ccf65c2d09 chore(ws): release @discordjs/ws@1.0.0 2023-07-31 21:27:09 +02:00
iCrawl
d04987f09b chore(rest): release @discordjs/rest@2.0.0 2023-07-31 21:24:28 +02:00
iCrawl
ca5a2626b4 chore(collection): release @discordjs/collection@1.5.2 2023-07-31 21:22:35 +02:00
iCrawl
3c5a4dc7a7 chore(util): release @discordjs/util@1.0.0 2023-07-31 21:18:33 +02:00
iCrawl
447652ec8a chore: format 2023-07-31 21:08:13 +02:00
iCrawl
488aa58b29 chore: fixup yarn.lock 2023-07-30 23:16:45 +02:00
iCrawl
a92d19212d ci: publishing dev version semver 2023-07-30 23:08:46 +02:00
iCrawl
fd8197fe5b chore: deps 2023-07-30 02:13:39 +02:00
ckohen
8f4256db8a refactor(REST): remove double classing (#9722)
* refactor(REST): remove double classing

BREAKING CHANGE: `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST`
BREAKING CHANGE: `REST#raw` has been removed in favor of `REST#queueRequest`
BREAKING CHANGE: `REST#getAgent` has been removed in favor of `REST#agent`

* chore: update for /rest changes
2023-07-25 08:40:21 +00:00
Saya
6307f81385 feat: add ws option support for "buildIdentifyThrottler" (#9728)
* feat: add option support for "buildIdentifyThrottler"

* docs: add documentation for buildIdentifyThrottler

* docs: fix example code
2023-07-22 08:57:24 +00:00
iCrawl
d26e022afc chore: deps 2023-07-19 11:59:42 +02:00
iCrawl
afa98793cd chore: deps 2023-07-17 09:45:07 +02:00
Vlad Frangu
386f206caf feat: no-de-no-de, now with extra buns (#9683)
BREAKING CHANGE: The REST and RequestManager classes now extend AsyncEventEmitter
from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
between Node, Deno, Bun, CF Workers, Vercel Functions, etc.

BREAKING CHANGE: DefaultUserAgentAppendix has been adapted to support multiple
different platforms (previously mentioned Deno, Bun, CF Workers, etc)

BREAKING CHANGE: the entry point for `@discordjs/rest` will now differ
in non-node-like environments (CF Workers, etc.)

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: suneettipirneni <suneettipirneni@icloud.com>
2023-07-17 08:27:57 +02:00
David Malchin
351a18bc35 feat(create-discord-bot): throw error if the directory is a file (#9719) 2023-07-16 17:38:22 +00:00
Suneet Tipirneni
84f1b1890d feat(create-discord-bot): Add prompts, command handler and deployment script (#9570)
* feat(create-discord-bot): Add prompts, command handler and deployment script

* fix: revert package template name

* chore: make requested changes

* chore: make requested changes

* fix: remove uneeded listeners

* fix: use `0` for eslint

* fix: remaining requested changes

* chore: requested changes

* fix: remove redundant call
2023-07-16 17:13:18 +00:00
Jiralite
e5effb6f6a docs: Change Channel to BaseChannel (#9718)
docs: change `Channel` to `BaseChannel`
2023-07-16 15:06:14 +00:00
Jiralite
125405f1cf docs(BaseChannel): Remove APIChannel (#9717)
docs(BaseChannel): remove `APIChannel`
2023-07-16 14:59:35 +00:00
David Malchin
bc83cabfda feat(WebhooksAPI): allow with token requests without bot auth (#9715)
* Also move `get`'s `token` parameter to options.
2023-07-16 10:25:29 +00:00
brynpttrsn
20268ac0c4 feat(website): switch overload on hash location (#9699)
* feat(website): switch overload on hash location

* Update apps/website/src/components/OverloadSwitcher.tsx

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
2023-07-15 19:34:28 +02:00
Aura Román
3c85fb21e6 feat(Client): add guildAvailable event (#9692)
* feat(Client): add `guildAvailable` event

* refactor: sort entries alphabetically

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-15 17:33:47 +00:00
brynpttrsn
4141405dcd fix(website): type alias search symbol (#9705) 2023-07-15 19:25:56 +02:00
David Malchin
8c782bfd52 fix(WebSocketShard): close errors not being catchable (#9704)
* fix(WebSocketShard): close errors not being catchable

* fix(WebSocketShard): requested changes
2023-07-15 10:55:05 +00:00
Almeida
8d97017458 feat: user avatar decorations (#8914)
feat(User): add avatar decorations

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-07-13 20:33:38 +00:00
DD
ceab07bec8 refactor(WebSocketShard): throttling error handling (#9701)
* refactor(WebSocketShard): handle unknown identify errors

* chore: use better abort check

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-12 17:19:11 +00:00
Jiralite
7fb91c57f7 fix(ChannelUpdate): Check against unknown channels (#9697)
fix(ChannelUpdate): check against unknown channels
2023-07-11 18:13:25 +00:00
Aura Román
09b0382c45 perf(Channel): linear speed position getter (#9497)
* perf(Channel): linear speed position getter

* fix: add another set of parens

* perf: lower memory and CPU usage

* refactor: add shared private utility for group types

* perf: improve readability and performance

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

* feat: add support for voice sortables

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-09 20:57:33 +00:00
Jiralite
719e54a921 fix(Action): Use existing recipients if available (#9653)
* fix(Action): use existing recipients if available

* fix: account for message delete -> interaction

* fix(Action): use `last_message_id` if it exists

* refactor(Action): use ternary

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-09 19:30:48 +00:00
Jiralite
ede9f4e5e2 docs(BuildersSelectMenuOption): Update link (#9690)
docs(BuildersSelectMenuOption): update link
2023-07-09 19:26:21 +00:00
MovementGH
df40dcdb85 feat: add silent option to ShardingManager (#9506)
* feat: add silent option to ShardingManager

* chore: update ShardingManagerOptions type

* chore: update typings

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-07-07 23:32:29 +00:00
RedGuy12
53c17e00c0 feat(EmbedBuilder): add .length (#8682)
* feat(Embed): add `.length`

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* Move to mainlib

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* types: add typings

---------

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:53:19 +00:00
Almeida
dc73c938ff feat: guild onboarding (#9120)
* feat: guild onboarding

* feat: types and /core method

* fix: route

* fix: make emoji name non-nullable

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:48:17 +00:00
Jiralite
a48d0efb09 types(MessageManager): Allow comparison of messages again (#9612)
* types(MessageManager): allow comparison of messages again

* feat: match TypeScript

* docs: update wording

* chore: revert breaking change

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:39:01 +00:00
GrapeColor
a73d54e43a feat: add resume event in shard (#9650)
Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 21:34:42 +00:00
Rodrigo Leitão
cf8012c200 refactor(User): remove deprecation warning from tag (#9660)
* refactor(User): remove deprecation warning from tag

* fix: remove unnecessary declarations

* style: fix formatting issue

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 16:49:03 +00:00
Synbulat Biishev
0803eb562b fix: everyone role members (#9685)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 14:09:31 +00:00
David Malchin
78381a56cf feat(ChannelsAPI): add permission overwrites (#9651)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 13:55:29 +00:00
Suneet Tipirneni
6d5840c61e fix(core): fix inconsistencies on core (#9680)
* fix(core): fix inconsistencies on `core`

* fix: add `createForumPost` back

* fix: create -> createWebhook
2023-07-06 13:35:10 +00:00
ShadowAya
75d91b52b3 setNameLocalization typo (#9656)
fix JSDoc typo in NameAndDescription.ts > setNameLocalization
2023-06-17 14:29:35 +00:00
Almeida
766be94b93 chore: bump discord-api-types to 0.37.45 (#9654) 2023-06-15 19:06:52 +00:00
RedGuy12
b61e4fb0dc fix: awaitMessageComponent with MessageComponentInteractions (#8598)
* fix: `awaitMessageComponent` with `MessageComponentInteraction`s

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* Update packages/discord.js/src/structures/InteractionCollector.js

Co-authored-by: Almeida <almeidx@pm.me>

* types: revert unrelated changes

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* Remove unneeded truey check

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* chore: remove extra block

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* fix: `awaitMessageComponent` with `MessageComponentInteraction`s

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* fix: `awaitMessageComponent` with `MessageComponentInteraction`s

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

---------

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:25:53 +00:00
Jiralite
d64330a157 types(AutoModerationActionExecution): Add forum channels as a possible type in channel() (#9623)
types(AutoModerationActionExecution): type forum channels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:14:16 +00:00
Jiralite
2818d7cc1d fix(client): Add missing application command permissions update event (#9639)
fix(client): add missing event

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:11:00 +00:00
RedGuy12
a6dbe163dd fix(ThreadManager): Fix internal crash upon conditionally resolving thread members (#9648)
* fix(ThreadManager): Fix crash

* chore: prettier

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 18:07:48 +00:00
Souji
73c2f8aa17 feat(presence): re-introduce image resolving for other platforms (#9637)
* spotify, youtube, twitch
* regression born from misunderstanding in 9a6e691

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 17:45:28 +00:00
GrapeColor
a873ec1e85 feat: Add message to send resume event to shard (#9626)
* fix(WebSocketManager): Fix not ready after reconnect

* fix(WebSocketManager): Move fixes from Ready to Resume

* fix: undo changes

* feat: Add message to send resume event to shard

---------

Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-14 11:43:23 +00:00
dependabot[bot]
db925fa269 build(deps-dev): bump vite from 4.3.8 to 4.3.9 (#9625)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.8 to 4.3.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.3.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-13 19:20:07 +00:00
Ryan Munro
8f3bd38072 fix(User): check global name in equals (#9631)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-13 19:17:21 +00:00
ckohen
8f014c65ef chore: unpin rest, unbump node version req (#9632)
* chore: unpin rest, unbump node version req

* chore: update readmes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-13 19:08:35 +00:00
brynpttrsn
1716202f44 fix(website): Overload switcher duplicates reference links (#9614)
fix(website): add idx to link key
2023-06-13 21:01:18 +02:00
Rodrigo Leitão
1cab79f6fd types(ModalSubmitFields): components is an array (#9406)
* types(ModalSubmitFields): components is an array

* types(ModalSubmitFields): make type coherent with docs

* refactor(ModalSubmitInteraction): remove undefined props
2023-06-13 20:58:50 +02:00
brynpttrsn
7b494aca5b fix(website): switch signature with overload (#9643) 2023-06-13 20:55:56 +02:00
Jiralite
cd6986854f types: Use readonly arrays and const type parameters in places (#9641)
* types: wrap arrays in `Readonly<>`

* refactor: prefer `readonly` syntax

Co-authored-by: Almeida <almeidx@pm.me>

* types: `const` type parameters

* test: add tests

* fix: fix more instances

---------

Co-authored-by: Almeida <almeidx@pm.me>
2023-06-12 18:00:45 +00:00
Jiralite
6c2242f4f9 types(BaseInteraction): appPermissions not null in guilds (#9601)
types(BaseInteraction): allow `appPermissions` only in guilds

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 10:02:22 +00:00
Mogyuchi
75308f2669 fix(WebSocketManager): await WebSocket destroy (#9519)
fix(WebSocketManager): await ws destroy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 09:59:18 +00:00
İbrahim
bc2798b8ee docs: Define /core token in example (#9586)
* Importing Token

Importing token was missing, so I added it. It is getting the token from configuration file. 

It could have been done with defining a constant variable too, but importing makes more sense.

* Updated Token Field to "dotenv"

From now, user's can use dotenv package to keep their Discord client token.

* Referring token as DISCORD_TOKEN

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 09:41:07 +00:00
volcanofr
a531dc9f1c RESTOptions: (really) small description update for cdn (#9615)
Small option update cnd REST.ts

I just add "``" to uniform cdn @defaultValue with others one (like api).
The link is not broken anymore, because it do not work anymore.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 09:00:20 +00:00
Ryoh827
911e6eff75 docs(ClientOptions): change default value of sweepers in docs (#9591)
* docs(ClientOptions): change default value of sweepers in docs

* docs(ClientOptions): set sweeper defaults by type

* docs(ClientOptions): add 'this.' to DefaultSweeperSettings in docs

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 08:45:42 +00:00
Synbulat Biishev
1ab60f9da4 feat: support new username system (#9512)
* feat: support new username system

* docs(GuildMember#displayName): update

* fix(User#hasNewUsername): use User#discriminator

* feat(User#tag): add new username

* docs(User#tag): update

* docs(User#hasNewUsername): update

* docs: update

* feat(User#defaultAvatarURL): update

* feat: remove some newly added properties

* docs(User#discriminator): update

* docs(User#globalName): bad Copilot

* feat(User#displayName): return display name

* types(User#displayName): not a partial structure

* feat: add `calculateUserDefaultAvatarId` function

* docs(CND#defaultAvatar): update

* docs(CDN#defaultAvatar): update

* feat: change default avatar id to type

* feat: deprecate `User#tag`

* docs(CDN#defaultAvatar): update

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

* docs(User): update

Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com>

* feat: update

* typing: update

Co-authored-by: Jan <66554238+vaporoxx@users.noreply.github.com>

* feat: change the param type to `Snowflake`

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporoxx@users.noreply.github.com>
2023-06-08 18:16:42 +00:00
Qjuh
df8b6e9934 fix(WebSocketManager): always cache result of fetchGatewayInformation (#9611)
* fix(WebSocketManager): always cache result of fetchGatewayInformation

* fix: add comment
2023-05-29 18:45:17 +00:00
nopeless
24a61495b9 fix(Client): safe call for possibly null WebSocket (#9600)
fix(client): safe call for possibly null Websocket
2023-05-26 17:27:17 +00:00
Jiralite
e1b6eeed0e docs(Client): Correct invite gateway permission checks (#9597)
docs: correct invite gateway permission checks
2023-05-26 08:18:48 +00:00
Jiralite
53aa24d418 fix(ThreadManager): Ensure fetchActive() only returns active threads in a channel (#9568)
fix(ThreadManager): revert breaking change

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-25 17:16:48 +00:00
iCrawl
9b06734445 chore: deps 2023-05-23 20:14:15 +02:00
Digital
9345d1b1ac fix(LimitedCollection): allow items to be stored if keepOverLimit is true when maxSize is 0 (#9534)
Update LimitedCollection.js

Keep value if it matches the limit.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-22 08:11:47 +00:00
Jiralite
47843493a5 feat(guide): Add formatters popular topic (#9566)
* feat: add formatters page

* chore: rename pages
2023-05-22 10:06:48 +02:00
David Malchin
6c7a5ed1e7 fix(api): various fixes for overlooked stuff (#9588)
* types(GuildsAPI): fix `getWidgetSettings()` result type

* types(GuildsAPI): fix `beginPrune()` result type

* types(GuildsAPI): fix `editAutoModerationRule()` result type

* types(ApplicationCommandsAPI): fix guild application types

* types(GuildsAPI): fix `createTemplate()` body type

* fix(InteractionsAPI): make `followUp()` return the message

According to the Discord docs, creating a followup message is the same as executing a webhook, but *wait is always true*, meaning we always get the message.

* types(WebhooksAPI): fix result types
2023-05-22 07:59:57 +00:00
Jaw0r3k
985def3f25 feat(api): add stage instances (#9578)
* feat(core): add stage instances

* chore: use one import

* Apply suggestions from code review

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

* chore: requested changes

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

* Apply suggestions from code review

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

---------

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: David Malchin <malchin459@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-19 19:18:33 +00:00
Jiralite
1c4a12c7d6 types: use Snowflake instead of string for snowflakes (#9583)
fix: use `Snowflake` not `string`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-19 17:33:43 +00:00
brynpttrsn
8107c5c0e7 fix(website): header and sidebar icons (#9574)
* fix: header icons

* Reorder imports

* remove field symbol

* fix type sidebar icon

* remove import

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-19 17:28:37 +00:00
Aura Román
b85a3f2dde refactor(collection): reduce reduce's code (#9581)
* refactor(collection): reduce `reduce`'s code

* fix: resolved bug in tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 21:05:48 +00:00
David Malchin
3535321b98 fix(GuildsAPI): use level rather than mfa_level when editing MFA (#9584) 2023-05-18 17:03:09 +00:00
Idris
46167a79d7 refactor(GuildMember): make _roles property non-enumerable (#9387)
* refactor(GuildMember): make _roles a getter and roles a normal prop

* fix: revert changes

* fix: requested changes

* fix: requested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 10:13:19 +00:00
Idris
cffa5d19c9 feat(guide): port Collectors page (#9567)
* feat(guide): port Collectors page

* fix: requested changes

* fix: requested changes

* fix: suggested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 09:06:00 +00:00
David Malchin
5d6eed6414 feat(GuildsAPI): add removeMember() (#9576) 2023-05-16 09:37:06 +00:00
iCrawl
90e243d350 chore: deps 2023-05-16 00:14:14 +02:00
David Malchin
590f5bc38e feat(api): add getMemberBans() query options and getMemberBan() (#9569) 2023-05-14 07:40:04 +00:00
Jiralite
7196fe36e8 fix(AutocompleteInteraction): Prevent snake casing of locales (#9565)
* fix(AutocompleteInteraction): prevent snake casing of locales

* fix: avoid unnecessary overhead ops

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

---------

Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-05-12 22:03:10 +00:00
iCrawl
5351ab429b build(ui): tree-shake ui components 2023-05-12 20:20:42 +02:00
iCrawl
d033f925e0 fix(websites/guide): remove flex-basis 2023-05-12 20:02:04 +02:00
iCrawl
13073acefc fix(ui): expose options for discord components 2023-05-12 20:00:02 +02:00
iCrawl
7c8849fae5 chore: deps 2023-05-12 19:58:51 +02:00
Jiralite
d01e8aa8af docs: Fix broken links to new documentation (#9563)
docs: fix broken links
2023-05-12 16:54:25 +00:00
DD
4dcc9c50f8 fix(WebSocketShard): handle initial connect being a resume (#9549)
* fix(WebSocketShard): handle initial connect being a resume

* chore: remove leftover

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-11 17:42:10 +00:00
Jiralite
a51c48e743 fix(webhooks): Remove incorrect properties in edit message code sample (#9562)
fix(webhooks): remove incorrect properties in edit message code sample
2023-05-11 16:43:54 +00:00
Jiralite
1edd01a7a4 feat(client): Support more request member fields (#9475)
feat(client): support more request member fields

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-10 16:40:52 +00:00
Jiralite
7b617bd22e feat: Create discord-api-types documentation component (#9555)
feat: add discord-api-types link component

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-09 19:49:07 +00:00
brynpttrsn
0c175c02e9 fix(website): package and version button formatting (#9556)
* fix for djs package button and removed redundant divs

* version arrow formatting

* formatting
2023-05-09 16:02:52 +02:00
Jiralite
460ac7dfe2 chore: Add repository directory (#9552)
chore: add repository directory
2023-05-08 17:12:31 +00:00
Jiralite
64324a8be1 feat: Check for empty directory (#9539)
* feat: check for empty directory

* fix: correct error

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

---------

Co-authored-by: space <spaceeec@yahoo.com>
2023-05-08 09:00:09 +02:00
Jiralite
b6162bc5b5 fix: Resolve imports for Windows (#9546)
fix: windows why

Co-authored-by: DD <didinele.dev@gmail.com>
Co-authored-by: Almeida <almeidx@pm.me>
2023-05-08 08:59:53 +02:00
synicalsyntax
280ed0ce08 fix(website): various UI improvements (#9538)
* fix(website): raise category z-index to prevent clipping

* refactor(website): wrap footer badges when necessary to prevent overflow
2023-05-08 08:59:25 +02:00
Jaw0r3k
5b8d535fd6 fix: Non-existing data property (#9544)
fix: not existed data prop

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-07 19:39:43 +00:00
Almeida
c4a3120354 feat(create-discord-bot): inherit stdio when installing deps (#9543) 2023-05-07 19:27:33 +00:00
Jaw0r3k
8482e3c95d fix(create-discord-bot): Fix start script (#9542)
fix: not working npm start

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-07 19:08:23 +00:00
Superchupu
12482b70ed docs: add Cloudflare sponsorship in create-discord-bot readme (#9540)
chore: add cloudflare sponsorship in `create-discord-bot` readme
2023-05-07 18:47:46 +00:00
iCrawl
fa746b079d chore: patch tsup 2023-05-07 19:17:10 +02:00
iCrawl
fc3f0756a4 chore: configs 2023-05-07 18:26:46 +02:00
iCrawl
3bfb6197a0 chore(create-discord-bot): release create-discord-bot@0.1.0 2023-05-07 18:13:04 +02:00
iCrawl
5ecc4f13b5 chore: re-gen yarn.lock 2023-05-07 18:10:56 +02:00
Jiralite
f83a8a58c9 feat: create-discord-bot (#9420)
* feat: basic initialisation

* fix: no scope

* chore: add options for issues

* feat: good word, Monbrey

* feat: basic README.md

* fix: no documentation for this

* feat: install for them

* chore: update licencing

* chore: fix year

* fix: build tsup

* feat: add TypeScript option

* feat: add `name` option

* chore: ignore annoying errors

* chore: add tsconfig.json

* refactor: remove name

We can just use the name of the directory instead.

* chore: update cliff jumper rc

* chore: bump dependencies

* chore: bump dependencies

* fix: build in prepack

* fix: configure ESLint correctly

* feat: infer package manager

* docs(packageManager): document `install()`

* fix(packageManager): do not emit a warning for `npm`

* refactor: change project name colour to yellow

* docs(constants): basic documentation

* feat: add link

* chore: add `verbatimModuleSyntax`

* chore: bump discord.js

* refactor: switch to @sapphire/ts-config

* refactor: file name changes

* refactor: tweak description

* chore: update yarn.lock

* fix: add .env

* chore: bump dependencies

* feat: event handler

* refactor: use `default`

* refactor: simpler event

* chore: bump discord.js

* fix: add release script and reorder

* style: reorder package.json

* chore: remove unneeded ignores

* chore: bump minimum Node.js version

* chore: add @types/node to TypeScript package.json

* chore: apply requested changes

Co-authored-by: Noel <buechler.noel@outlook.com>

* style: run ESLint + Prettier

* refactor: prefer "the"

* refactor: remove some comments

* feat: add ESLint + Prettier

* chore: requested changes

Co-authored-by: Noel <buechler.noel@outlook.com>

* chore: more requested changes

Co-authored-by: Noel <buechler.noel@outlook.com>

---------

Co-authored-by: Noel <buechler.noel@outlook.com>
2023-05-07 18:05:26 +02:00
iCrawl
9ddb3ff71d chore: deps 2023-05-07 18:04:10 +02:00
Superchupu
7ce6bb99e9 chore(deps): pin @discordjs/ws version in discord.js (#9533)
* chore(discord.js): pin `@discordjs/ws` version

* chore: update lockfile
2023-05-07 16:40:19 +02:00
Jiralite
da6de92e8c feat(DocsLink): Support overriding text (#9525) 2023-05-07 16:22:05 +02:00
synicalsyntax
bbf80efbb0 fix(guide): various UI improvements (#9532) 2023-05-07 16:20:54 +02:00
Synbulat Biishev
227232112d feat(GuildAuditLogsEntry#extra): add missing channel property (#9518)
* feat(GuildAuditLogsEntry#extra): add missing `channel` property

* types(GuildAuditLogsEntryExtraField): update

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-07 00:55:02 +00:00
Jaw0r3k
37181ab232 perf(Role): improve members getter (#9529)
perf(Role): improve members
2023-05-06 23:37:43 +00:00
ckohen
cdaa0a36f5 refactor(rest): switch api to fetch-like and provide strategies (#9416)
BREAKING CHANGE: NodeJS v18+ is required when using node due to the use of global `fetch`
BREAKING CHANGE: The raw method of REST now returns a web compatible `Respone` object.
BREAKING CHANGE: The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
BREAKING CHANGE: Many underlying internals have changed, some of which were exported.
BREAKING CHANGE: `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
2023-05-06 21:09:19 +02:00
iCrawl
fc5b9c523b ci: positional arguments 2023-05-06 17:00:27 +02:00
iCrawl
256b68bf9f ci: pass push arguments to buildx 2023-05-06 16:54:08 +02:00
Jiralite
75195cc539 chore(guide): Update discord.js version to 14.11.0 (#9523) 2023-05-06 14:57:13 +02:00
DD
8d5ce32080 fix(proxy-container): docker builds (#9524) 2023-05-06 13:59:14 +02:00
iCrawl
5bfcf93e29 chore(discord.js): release discord.js@14.11.0 2023-05-06 11:06:10 +02:00
iCrawl
28f51791a2 chore(ws): release @discordjs/ws@0.8.3 2023-05-06 11:05:18 +02:00
DD
e6274681fd fix(WebSocketManager): properly emit shard error events (#9521)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-05 20:17:05 +00:00
DD
00da44a120 fix(WebSocketShard): wait a little before reconnecting (#9517)
* fix(WebSocketShard): wait a little before reconnecting

* chore: leftover comment

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-05 20:14:53 +00:00
Mateusz Burzyński
ab39683a50 chore: "hide" ./defaultWorker entrypoint with types: null (#9485)
* fix: move `types` condition to the front

* Update packages/ws/package.json

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-05 20:08:12 +00:00
DD
3e80f0b384 tests(ws): fix tests (#9520) 2023-05-05 22:01:28 +02:00
iCrawl
e53b94c979 chore: remove cron 2023-05-05 21:21:09 +02:00
Almeida
6b2c3fb9d0 feat(Guild): safety alerts channel and mention raid protection (#8959)
* feat(Guild): add safety alerts channel and mention raid protection

* docs: add missing tag

* fix: keep other properties in triggerMetadata

* docs(Guild): update example usage

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-05 18:39:58 +00:00
iCrawl
d8d21cf370 chore: cloudflare sponsorship 2023-05-05 20:29:10 +02:00
Aura Román
8e9a2b4630 perf(Role): linear speed position getter (#9493)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-05 12:49:00 +00:00
iCrawl
d4f12e0a0c chore: deps 2023-05-05 14:30:47 +02:00
Jiralite
d7b18f0681 types(StringSelectMenuComponentData): options is required (#9515)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-05 12:28:39 +00:00
Jiralite
166c961261 fix(roleConnections): Fix body type for updateMetadataRecords() (#9516) 2023-05-05 09:42:12 +02:00
Jiralite
506f7fcd3b fix(guide): Fix unknown component in v14 update guide (#9514)
* chore(constants): update discord.js to 14.10.2

* feat(DocsLink): handle only a package

* fix(updating-to-v14): fix unknown component
2023-05-05 07:37:47 +00:00
Jiralite
51d53f5117 feat(guide): Add webhooks (#9479)
* feat: add page

* feat: add assets

* chore: DocsLink

Co-authored-by: Ryan Munro <monbrey@gmail.com>

* fix: config import

* fix: another assert bug

* chore: lint

* fix: actually fix the destructure

---------

Co-authored-by: Ryan Munro <monbrey@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-04 08:49:18 +00:00
Idris
aa32d67619 chore(voice-description): being consistency with Node.js casing (#9505)
docs(voice-description): being consistency with Node.js casing

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-04 08:44:35 +00:00
Suneet Tipirneni
4b077e679c refactor(guide): use @type comments for command data code (#9489)
* refactor(guide): use `@type` comments for command data code

* fix: typo

* fix: use correct doc comment

* fix: use one line

* feat: add param types

* fix: use command interaction instead

* Update apps/guide/src/content/03-creating-your-bot/03-adding-commands.mdx

Co-authored-by: Souji <timoqueezle@gmail.com>

* chore: lint

---------

Co-authored-by: Souji <timoqueezle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-03 23:58:53 +00:00
iCrawl
c190c57d64 chore: re-apply patches 2023-05-03 18:25:20 +02:00
Jaw0r3k
423bfce286 docs: Add bug/feature form for ui and util (#9504)
feat: add tags for other packages
2023-05-03 16:20:09 +00:00
iCrawl
5d05b7230a chore: re-gen yarn.lock 2023-05-03 02:30:15 +02:00
iCrawl
7e875f6919 chore: refactor workspace 2023-05-03 02:14:22 +02:00
Qjuh
c429763be8 fix(WebSocketManager): emit raw ws events again (#9502) 2023-05-02 19:49:55 +00:00
Jiralite
1b7981e469 docs(Client): Update Sapphire's snowflake utility links (#9501) 2023-05-02 12:56:38 +02:00
Aura Román
f2ad0762c5 refactor(GuildChannel): simplify constructor (#9499) 2023-05-02 10:32:47 +00:00
iCrawl
6d7f3b0f5c chore(discord.js): release discord.js@14.10.2 2023-05-02 01:18:23 +02:00
Almeida
201b002ad4 fix: correct isJSONEncodable() import (#9495)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-05-01 22:25:51 +00:00
Almeida
b327f4925f fix(Client): generateInvite() scope validation (#9492) 2023-05-01 22:11:11 +00:00
iCrawl
e262df9117 chore(discord.js): release discord.js@14.10.1 2023-05-01 23:50:16 +02:00
iCrawl
7a761d4cfb chore: properly use cjs in module 2023-05-01 23:49:59 +02:00
iCrawl
ac9bf3ac06 fix(Client): spelling of InvalidScopesWithPermissions 2023-05-01 23:49:32 +02:00
iCrawl
133a6bbf49 chore(builders): release @discordjs/builders@1.6.3 2023-05-01 23:35:14 +02:00
iCrawl
63fc9f8504 chore(util): release @discordjs/util@0.3.1 2023-05-01 23:34:16 +02:00
Almeida
a9f2bff82a refactor(ShardClientUtil): logic de-duplication (#9491)
added docs to the `calculateShardId` function
2023-05-01 20:08:45 +00:00
Almeida
54ceedf6c5 refactor: remove @discordjs/util re-export (#9488) 2023-05-01 21:47:30 +02:00
Jiralite
36b7fb2f00 feat(guide): Update to 14.10.0 (#9487) 2023-05-01 21:05:29 +02:00
iCrawl
9a56edaf8c chore: add module resolution for the website 2023-05-01 18:21:02 +02:00
iCrawl
be81c8bf3b chore(discord.js): release discord.js@14.10.0 2023-05-01 17:42:07 +02:00
iCrawl
c77a1765c4 chore(core): release @discordjs/core@0.6.0 2023-05-01 17:35:40 +02:00
iCrawl
3665ad65d0 chore(ws): release @discordjs/ws@0.8.2 2023-05-01 17:34:27 +02:00
iCrawl
d4de1cd09e chore(proxy): release @discordjs/proxy@1.4.1 2023-05-01 17:31:00 +02:00
iCrawl
481bbc924f chore(rest): release @discordjs/rest@1.7.1 2023-05-01 17:29:19 +02:00
iCrawl
ca81e61b4c chore(formatters): release @discordjs/formatters@0.3.1 2023-05-01 17:24:36 +02:00
iCrawl
eb603c0d11 chore(util): release @discordjs/util@0.3.0 2023-05-01 17:22:55 +02:00
iCrawl
072c9da5df chore(collection): release @discordjs/collection@1.5.1 2023-05-01 17:20:16 +02:00
iCrawl
cd591327d6 chore(builders): release @discordjs/builders@1.6.2 2023-05-01 17:16:31 +02:00
iCrawl
71e67d8c97 chore(brokers): release @discordjs/brokers@0.2.1 2023-05-01 17:15:29 +02:00
Qjuh
a9e0de4288 refactor(WebSocketManager): use /ws package internally (#9099) 2023-05-01 17:08:23 +02:00
iCrawl
c5b4423a5a ci: properly add all tsconfig options 2023-05-01 16:44:36 +02:00
iCrawl
47b08be509 ci: fix start scripts for actions 2023-05-01 16:34:56 +02:00
iCrawl
2e0804ae92 ci: update node version 2023-05-01 16:27:29 +02:00
iCrawl
71983cc5d1 ci: make package optional for docs upload 2023-05-01 16:02:05 +02:00
iCrawl
0f3d870ce6 ci: properly look for docs 2023-05-01 15:57:28 +02:00
iCrawl
ce4e1fc2c6 ci: dramatically speed up docs building 2023-05-01 15:55:14 +02:00
iCrawl
0762ddb3f4 chore: deps 2023-05-01 15:29:51 +02:00
iCrawl
80af9696d3 build: leftover extensions 2023-05-01 15:23:15 +02:00
iCrawl
48cab844d4 build: switch to bundler moduleResolution 2023-05-01 13:14:13 +02:00
iCrawl
8b71f44b1f chore: deps 2023-05-01 12:05:55 +02:00
Almeida
f27631175a feat(ui): support embed image, thumbnail, author url, and url (#9478) 2023-04-30 16:56:34 +02:00
GrapeColor
ad217cc760 fix(ShardClientUtil): Fix client event names (#9474)
Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-30 10:16:44 +00:00
iCrawl
1ba7394a7d chore: deps 2023-04-30 09:01:17 +02:00
Jiralite
260c46d51c feat(guide): Add audit logs (#9429) 2023-04-30 07:50:14 +02:00
iCrawl
6229597db2 fix(guide): add more headings 2023-04-29 20:10:06 +02:00
iCrawl
8d212e4859 feat(guide): anchor links 2023-04-29 20:05:22 +02:00
iCrawl
51e8f02ef7 fix(ui): author and reply author spacing 2023-04-29 17:44:02 +02:00
Tetie
496c4e2884 feat(ui): support verified bots and colored authors (#9471)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-29 17:26:31 +02:00
Jiralite
77191a2e7b docs: Add new issue form for applications (#9470) 2023-04-28 21:47:19 +02:00
Jiralite
375483b0f9 feat(guide): Add threads (#9430) 2023-04-28 21:46:45 +02:00
Jiralite
17cd4b610a fix(guide): Show rest of TypeScript code block (#9465) 2023-04-28 21:46:27 +02:00
Suneet Tipirneni
988f8c7546 refactor(website): consolidate styling for buttons (#9466) 2023-04-28 21:42:47 +02:00
Jiralite
217e5d8100 fix(BaseClient): Prevent user agent mutation (#9425)
fix(BaseClient): prevent user agent mutation
2023-04-28 17:46:50 +00:00
Jaw0r3k
40d07fbbbd fix(BitField): use only enum names in iterating (#9357)
* fix: use only names in iterating bitfield

* fix: not a number

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

* fix: serialize

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

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-28 17:25:11 +00:00
anandre
1b15d31b5a docs(AutoModerationRule): update docs (#9464)
* Update AutoModerationRule.js

Update the docs descriptions for some of the AutoModerationRule methods to make them clearer and easier to understand

* Update AutoModerationRule.js

Updated the `exemptRoles` and `exemptChannels` parameter descriptions for their respective helper methods to match the typedef `AutoModerationRuleEditOptions`.

* Update AutoModerationRule.js

Update the `mentionTotalLimit` description to match the one in the `AutoModerationTriggerMetadataOptions` typdef.

* Update packages/discord.js/src/structures/AutoModerationRule.js

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-04-28 17:19:14 +00:00
Idris
d26df5faba types(AutoModerationActionMetadataOptions): make channel property optional (#9460)
* refactor(GuildMember): make _roles a getter and roles a normal prop

* types(AutoModerationActionMetadataOptions): make channel property optional

* fix: revert changes from another PR

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-28 17:13:27 +00:00
Ryan Munro
78fe247fc4 feat(guide): port and update lots of stuff (#9385)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-27 20:58:25 +02:00
RanAS
36216c0e1a docs: include StreamType enum description in new docs (#9457) 2023-04-27 20:29:27 +02:00
Jiralite
6212bffa30 docs: Update example usage (#9461) 2023-04-27 20:28:44 +02:00
Suneet Tipirneni
b2e1bb92d0 fix(website): don't duplicate overloaded methods (#9462) 2023-04-27 20:25:23 +02:00
Almeida
2e09cb4c1f feat(ui): support embed fields, footer icon, and timestamp (#9442) 2023-04-25 19:05:14 +02:00
Michael H
1b4d34cebf chore: Add directory to package.json (#9456)
* chore: Add directory to package.json

* fix: run fmt

* fix: undo formatting
2023-04-25 14:27:44 +00:00
iCrawl
8153ca99ee ci: update formatting tag 2023-04-24 20:19:40 +02:00
iCrawl
43e205b840 chore: deps 2023-04-24 19:46:44 +02:00
Jiralite
c6ca5a83e7 docs(APITypes): Document role & user select menu components (#9435)
docs(APITypes): document select menu components

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-21 20:56:51 +00:00
Jiralite
5c52bb9590 docs(BaseMessageOptions): Fix embeds and components (#9437)
docs(BaseMessageOptions): fix embeds and components

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-21 20:43:17 +00:00
DD
a49ed0a2d5 refactor(proxy): rely on auth header instead (#9422)
* refactor(proxy): rely on auth header instead

* chore: typo

* chore: language

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

* chore: more language

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

* chore: more language nitpicks

Co-authored-by: ckohen <chaikohen@gmail.com>

* fix: unnecessary async

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
2023-04-21 20:36:15 +00:00
Almeida
3e01f91bbb feat(Attachment): voice messages (#9392)
Co-authored-by: Tetie <tjvssr@gmail.com>
2023-04-21 11:09:37 +02:00
anandre
7d341000d4 docs(InteractionResponses): showModal docs change (#9434)
* Update InteractionResponses.js

Update the parameters for the showModal method

* Update APITypes.js

Add APIModalInteractionResponseCallbackData link for docs link for showModal method

* Update InteractionResponses.js

Change the order of parameters so the ModalBuilder is listed first

* Update APITypes.js

Disable the ESline line length rule for the APITypes file

* Update InteractionResponses.js

Add ModalComponentData to the JSDoc, it was omitted before.
2023-04-21 08:17:44 +00:00
Jiralite
b49c5c9f48 ci: Fix issue triage (#9433) 2023-04-20 20:41:21 +02:00
MrMythicalYT
ce287f21d1 docs: use ESM code in examples (#9427)
* docs(Partials): use import statement

* docs: update readme to ESM

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-20 06:40:15 +00:00
MrMythicalYT
d6bca9bb4d docs: reference package names properly (#9426) 2023-04-20 06:25:32 +00:00
Jiralite
a2ab2b8717 feat(scripts): Sort issue labels (#9423)
feat(scripts): sort issue labels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-19 20:09:05 +00:00
Suneet Tipirneni
ecd1b5da11 refactor(website): consolidate badge logic (#9417)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-19 18:58:35 +02:00
Jiralite
0eb866357b ci: Update actions (#9424) 2023-04-19 18:57:16 +02:00
Almeida
d2d27ce734 fix: use new permission name (#9274)
* fix: use new permission name

* docs: requested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-19 14:32:07 +00:00
Jiralite
603446a692 chore: Bump dependencies for template package (#9418)
* chore: bump dependencies

* chore: update .yarnrc.yml
2023-04-19 05:43:46 +00:00
Suneet Tipirneni
f1fdd5b010 refactor(website): extract shared code heading styling into component (#9414)
* refactor(website): extract shared code heading styling into component

* chore: remove redundant variable
2023-04-17 21:33:51 +00:00
DD
5d1a4c27d5 feat(core): abstract gateway (#9410)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-17 20:05:05 +00:00
iCrawl
98a76db482 docs: generate static imports for types with api-extractor 2023-04-17 19:08:01 +02:00
Suneet Tipirneni
516c46117c feat(website): use tsdoc parameter names wherever possible (#9413)
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-17 18:44:17 +02:00
Tetie
7d7972d239 chore(Client): robust error checking (#9390)
* chore: robust error checking

* fix: check for null

* chore: add period

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

* fix: check for undefined correctly

* chore: robust error checking

* fix: check for null

* chore: add period

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

* fix: check for undefined correctly

* fix: check for null

* fix: update typings

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-04-17 15:05:32 +00:00
Jiralite
7b10e8cb63 feat: Add FAQ (#9407)
* feat: port over FAQ

* refactor: use async/await

Co-authored-by: Almeida <almeidx@pm.me>

* style: spacing

* refactor: use role id

* feat: more links!

* refactor: move comment up

* refactor: consistent naming style

---------

Co-authored-by: Almeida <almeidx@pm.me>
2023-04-17 08:31:53 +00:00
Jiralite
2f18323d2c fix(updating-to-v14): Parameter typo (#9408)
fix: parameter typo
2023-04-17 01:35:34 +00:00
Suneet Tipirneni
e04801bba1 fix(website): add equals to enum members (#9405) 2023-04-16 21:43:37 +00:00
iCrawl
09a9fb57e0 chore(core): release @discordjs/core@0.5.2 2023-04-16 23:02:41 +02:00
iCrawl
025b7aea29 chore(core): release @discordjs/core@0.5.1 2023-04-16 22:58:25 +02:00
iCrawl
7aa5ea731f chore(ws): release @discordjs/ws@0.8.1 2023-04-16 22:54:15 +02:00
iCrawl
f883279ab3 ci: re-add pr triage for labels 2023-04-16 22:50:43 +02:00
iCrawl
f1b2dec8e1 chore: add codeowners 2023-04-16 22:38:38 +02:00
Aura Román
0a1701b046 types(ChannelsAPI): use correct type for editMessage (#9399)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-16 18:27:16 +00:00
Jiralite
5dcc6df224 fix(updating-to-v14): Prioritise JavaScript (#9401) 2023-04-16 20:22:41 +02:00
Jiralite
1c35425120 fix(collection): filter() markdown (#9402) 2023-04-16 20:21:47 +02:00
Jiralite
cf1f5c0f0c chore(async-await): Update to ESM (#9403) 2023-04-16 20:21:30 +02:00
iCrawl
a210fc64a2 fix(website): dark mode text color 2023-04-16 19:21:41 +02:00
iCrawl
24f17998c8 refactor(website): revise landing page 2023-04-16 19:10:50 +02:00
iCrawl
eda118dae9 fix(guide): optimize redirects on middleware level 2023-04-16 17:42:05 +02:00
iCrawl
f2fce0a7da refactor(guide): always redirect to introduction 2023-04-16 17:38:45 +02:00
Jiralite
29389e39f4 feat(BaseInteraction): Support new channel payload (#9337)
* feat(BaseInteraction): support new channel payload

* refactor(InteractionCreate): different approach

Co-Authored-By: Synbulat Biishev <contact@syjalo.dev>

---------

Co-authored-by: Synbulat Biishev <contact@syjalo.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-16 14:28:32 +00:00
iCrawl
d5e9e36e8a fix(guide): let the breadcrumbs grow to the full size 2023-04-16 13:29:55 +02:00
iCrawl
8c0eb56ba5 fix(guide): ring cutoff on guide header 2023-04-16 13:02:10 +02:00
iCrawl
1b74c774c0 fix(website): cutoff ring outline in breadcrumbs 2023-04-16 11:22:16 +02:00
iCrawl
01949d6e3a fix(website): wrong breakpoint 2023-04-16 00:23:33 +02:00
iCrawl
3ea26cc1a6 refactor(website): only show search box on md and up 2023-04-16 00:17:12 +02:00
Suneet Tipirneni
a516d46f91 fix(website): right-align search bar (#9395) 2023-04-16 00:03:19 +02:00
iCrawl
b35b935679 fix(guide): sidebar types 2023-04-15 23:50:18 +02:00
iCrawl
0928c8f6ff fix(guide): remove astro leftovers 2023-04-15 23:37:19 +02:00
iCrawl
188d5eea28 chore: fix yarn.lock 2023-04-15 23:31:48 +02:00
iCrawl
412e4fffae build(website): prepare for turbopack 2023-04-15 18:15:24 +02:00
iCrawl
5e2f94c591 fix(website): max height 2023-04-15 14:28:20 +02:00
iCrawl
49627b1f46 chore(website): add banner 2023-04-15 14:03:03 +02:00
iCrawl
bcb48fea3e chore(website): redirect to core instead 2023-04-15 13:03:27 +02:00
iCrawl
c87e826087 style(website): remove dynamic width check 2023-04-15 04:43:23 +02:00
Ben
2dddbe1f32 feat(RoleTagData): add guildConnections (#9366)
* feat(roleTagData): add guildConnections

* feat(roletagdata): add guildConnections

* Update packages/discord.js/typings/index.d.ts

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

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: space <spaceeec@yahoo.com>
2023-04-14 22:04:57 +00:00
Almeida
86e5f5a119 docs(Options): fix links and invalid syntax (#9322)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:49:51 +00:00
BoogeyMan
300059cb26 docs: cleanup MessageCreateOptions and MessageReplyOptions (#9283)
* Fixed MessageReplyOptions

* updated MessageReplyOptions

* Deduplication - created BaseMessageCreateOptions

* Update packages/discord.js/src/structures/interfaces/TextBasedChannel.js

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

* Fixed spacing

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:46:15 +00:00
Erwan
d4c1fecbe2 fix(Message#editable): fix permissions check in locked threads (#9319)
fix(Message#editable): fix permissions check if channel is thread & locked

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:42:54 +00:00
Jiralite
79bcdfa767 docs(Events): Document auto moderation events (#9342)
docs(Events): document auto moderation events

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:39:35 +00:00
Jiralite
ca4de2d9c6 fix(BaseSelectMenuBuilder): Modify class to be abstract (#9358)
fix(BaseSelectMenuBuilder): abstraction

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 21:34:55 +00:00
Jiralite
794abe8450 refactor: Remove fromInteraction in internal channel creation (#9335)
refactor: remove `fromInteraction`
2023-04-14 21:29:27 +00:00
DD
02dfaf1aa2 refactor: abstract identify throttling and correct max_concurrency handling (#9375)
* refactor: properly support max_concurrency ratelimit keys

* fix: properly block for same key

* chore: export session state

* chore: throttler no longer requires manager

* refactor: abstract throttlers

* chore: proper member order

* chore: remove leftover debug log

* chore: use @link tag in doc comment

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

* chore: suggested changes

* fix(WebSocketShard): cancel identify if the shard closed in the meantime

* refactor(throttlers): support abort signals

* fix: memory leak

* chore: remove leftover

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-14 20:26:37 +00:00
Suneet Tipirneni
cac3c07729 fix(website): link dapi-types to proper website (#9388) 2023-04-14 20:53:57 +02:00
iCrawl
83143178aa ci: remove nextjs bundle analysis 2023-04-14 20:10:26 +02:00
iCrawl
615752e32b chore(website): cleanup ts-errors 2023-04-14 20:03:40 +02:00
iCrawl
2c25639a85 chore: update next.js dep 2023-04-14 19:23:59 +02:00
iCrawl
a76c1ddacc chore: fixup build and lint 2023-04-14 17:11:12 +02:00
Jiralite
0d0e4d1cb6 feat: Add changes from v13 to v14 (#9384) 2023-04-14 10:58:23 +02:00
iCrawl
d35f670d7a chore(website): move around static label 2023-04-14 10:33:20 +02:00
iCrawl
e4c5f794b0 fix(website): client-side rendering fallback 2023-04-13 23:29:45 +02:00
Jiralite
88cab1a0ec fix: Update DocsLink usage (#9382) 2023-04-13 22:55:15 +02:00
iCrawl
1c2cc09e05 fix(guide): temporary fix contentlayer dev 2023-04-13 22:28:33 +02:00
Jiralite
2a684361d4 fix(guide): Treeshake react-icons (#9381) 2023-04-13 22:09:40 +02:00
Almeida
66dc4014fe fix(interactions): make data parameter optional (#9379) 2023-04-13 22:01:08 +02:00
Jiralite
39c6694561 feat(DocsLink): Implement the component (#9380)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-13 21:55:15 +02:00
iCrawl
70da3746f8 fix(website): static badge and overload switcher 2023-04-13 20:56:44 +02:00
iCrawl
0340622f1a fix(ui): discord components 2023-04-13 20:15:59 +02:00
iCrawl
f36878677c chore: add chromatic 2023-04-13 19:41:23 +02:00
iCrawl
e5859b41cf chore: storybook 2023-04-13 19:09:56 +02:00
Jiralite
8218ffc78d types(CategoryChannel): Ensure parent and parentId are null (#9327)
types: ensure categories' parents are `null`
2023-04-13 16:10:53 +00:00
Jiralite
7ff3d528d9 types(GuildTextBasedChannel): Remove unnecessary exclusion of forum channels (#9326)
types(GuildTextBasedChannel): remove exclusion of forum channels

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-13 15:55:48 +00:00
Jiralite
0b7f296b62 chore(guide): Update pages (#9372) 2023-04-13 17:10:06 +02:00
Jiralite
85a379fdf8 feat(guide): How to contribute (#9376) 2023-04-13 14:19:43 +02:00
Jiralite
8ffcf77840 docs: add SnowflakeUtil (#9371) 2023-04-13 14:19:13 +02:00
iCrawl
fcb3a1ab27 fix(guide): update return link on 404 2023-04-12 01:04:36 +02:00
iCrawl
40be4f80dc fix(guide): light mode fix 2023-04-12 00:44:21 +02:00
iCrawl
ee907f32f3 feat(guide): sidebar 2023-04-12 00:39:35 +02:00
iCrawl
731ea5f3cb fix(website?): static params 2023-04-11 20:52:37 +02:00
iCrawl
24c462bf6f refactor(website): dark mode 2023-04-11 20:13:59 +02:00
iCrawl
78e02c4b63 fix(website): navigation and 404 2023-04-11 19:19:33 +02:00
iCrawl
dcf8757d35 ci: correct path again 2023-04-11 18:36:13 +02:00
iCrawl
a0c57abadd ci: uploading to before mv 2023-04-11 18:26:27 +02:00
iCrawl
1c5a6fa552 ci: update glob path 2023-04-11 18:12:56 +02:00
Jiralite
6a221a9676 fix(Property): Check for a property type excerpt (#9365) 2023-04-11 14:12:03 +02:00
DD
dcf58d8140 refactor(WebSocketShard): waitForEvent and its error handling (#9282)
* refactor(WebSocketShard): waitForEvent and its error handling

* chore: remove unnecessary error event

* chore: handle ECONNREFUSED/ECONNRESET

* fix: reset network error check

---------

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-11 11:10:32 +00:00
Jiralite
676307ff5c fix(core): Support attachment editing on interactions (#9356)
fix(core): support attachment editing on interactions

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-10 20:35:54 +00:00
Jiralite
23e0ac56f4 docs(formatters): Enhance the documentation (#9364) 2023-04-10 22:29:06 +02:00
Jiralite
8073561824 docs(builders): Add some basic documentation (#9359) 2023-04-10 22:09:51 +02:00
Jiralite
c0f2dd7131 docs: Use stable tag (#9343)
docs: use stable tag
2023-04-10 14:55:51 +00:00
Almeida
d6905b3b97 fix(website): dont show parameters header on functions without parameters (#9361) 2023-04-10 14:00:32 +02:00
Jiralite
774e23c572 fix(Function): Add link to source file (#9360) 2023-04-10 14:00:03 +02:00
Jiralite
1c8567f147 feat: Support @returns (#9362)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-10 13:59:29 +02:00
Jiralite
733c96c255 feat: Support @defaultValue (#9363) 2023-04-10 13:56:43 +02:00
iCrawl
69cdeb7296 ci: fix docs upload path 2023-04-10 13:23:27 +02:00
iCrawl
0019700869 chore(website): switch to revalidate on fetch level 2023-04-10 12:51:13 +02:00
iCrawl
3ea4d26ee9 fix(scripts): skip over namespaces 2023-04-09 19:32:41 +02:00
iCrawl
250eccf118 fix(website): members only on interfaces and classes 2023-04-09 19:12:42 +02:00
iCrawl
7d3827ebd1 fix(website): pass on revalidate 2023-04-09 18:55:59 +02:00
iCrawl
d1955f7c9e feat(website): static, optional, private, inherits, extends 2023-04-09 18:40:49 +02:00
iCrawl
6412da4921 feat: endpoint to retriveve memeber info 2023-04-09 14:21:45 +02:00
Jiralite
79123fb260 fix(ExcerptText): Use resolveItemURI() in excerpts (#9354)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-09 13:23:05 +02:00
iCrawl
3d2f4b405e chore(guide): bring guide up to speed 2023-04-09 12:41:02 +02:00
Almeida
bfee6c8d88 perf(RoleManager): dont call Role#position getter twice per role (#9352)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-09 10:29:18 +00:00
Jiralite
fbbce3eb4b fix: Correct @link tags that involve parents (#9351) 2023-04-09 11:22:07 +02:00
Jiralite
b2eec5f9fc docs: Remove JSONEncondable (#9344)
docs: remove `JSONEncondable`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-08 21:55:58 +00:00
Jiralite
b618e215f2 fix(util): Remove extra slash (#9347) 2023-04-08 23:51:58 +02:00
Jiralite
d66d113333 docs: Use @link in @see (#9348) 2023-04-08 23:50:58 +02:00
iCrawl
1b9d07f941 chore(website): downgrade planetscale dep 2023-04-07 21:25:15 +02:00
iCrawl
f893c6a357 chore: deps 2023-04-07 21:13:36 +02:00
iCrawl
687bbd889f chore(website): this may solve dynamic route problems
https://github.com/vercel/next.js/pull/47982
2023-04-07 20:54:16 +02:00
iCrawl
f195556b64 fix(website): downgrade nextjs 2023-04-07 20:10:20 +02:00
iCrawl
9aafdd6214 fix(website): model import 2023-04-07 13:41:19 +02:00
Jiralite
e3e7d500dc refactor: Use description constant in landing page (#9334) 2023-04-07 13:12:48 +02:00
iCrawl
3615e2f2d2 chore(website): deps 2023-04-07 13:10:01 +02:00
Tetie
a7425c29c4 fix: fix external links (#9313)
* fix: fix external links

* fix: fix external links

* fix: link to correct classes

* fix: fix JSONEncodable link

* chore: fix select menu link

* fix: fix external links

* fix: link to correct classes

* fix: fix JSONEncodable link

* chore: fix select menu link

* fix: fix collection#sweep url

* fix: fix subpackages urls

* fix: fix discord.js docs url

* Update packages/util/docs/README.md

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

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-04-07 10:35:56 +00:00
Suneet Tipirneni
c519fe66c9 refactor(ui): add 'use client' directives to client-only components (#9330) 2023-04-07 09:22:40 +02:00
Almeida
24f280290b fix(website): dont crash when serviceWorker is not available (#9331) 2023-04-07 09:22:09 +02:00
Almeida
6912faa9b3 fix(core): missed optional options (#9311)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-04 18:37:26 +00:00
iCrawl
0645bf0f7f fix(website): edge-config fallback 2023-04-02 18:30:00 +02:00
iCrawl
6aba9e99eb ci: planetscale upload 2023-04-02 13:22:52 +02:00
iCrawl
5efdf57894 chore: deps 2023-04-02 12:59:19 +02:00
iCrawl
74059c9d97 chore(builders): release @discordjs/builders@1.6.1 2023-04-02 12:38:29 +02:00
iCrawl
8d345a041e chore: add next to packages 2023-04-02 02:50:27 +02:00
iCrawl
1cbd04e8fd build: git-cliff config 2023-04-02 01:55:39 +02:00
iCrawl
8592edba39 chore(discord.js): release discord.js@14.9.0 2023-04-02 01:52:41 +02:00
iCrawl
38f0986000 chore(ws): release @discordjs/ws@0.8.0 2023-04-02 01:51:56 +02:00
iCrawl
9e077b749c chore(voice): release @discordjs/voice@0.16.0 2023-04-02 01:51:50 +02:00
iCrawl
b977ba5f4d chore(rest): release @discordjs/rest@1.7.0 2023-04-02 01:51:33 +02:00
iCrawl
1a6db13f6f chore(proxy): release @discordjs/proxy@1.4.0 2023-04-02 01:51:26 +02:00
iCrawl
3334739f4f chore(formatters): release @discordjs/formatters@0.3.0 2023-04-02 01:51:17 +02:00
iCrawl
26b2f59bdc chore(core): release @discordjs/core@0.5.0 2023-04-02 01:51:07 +02:00
iCrawl
b0ecc57977 chore(collection): release @discordjs/collection@1.5.0 2023-04-02 01:50:51 +02:00
iCrawl
035203f0d9 chore(builders): release @discordjs/builders@1.6.0 2023-04-02 01:49:33 +02:00
iCrawl
ce7d6b47b7 chore(brokers): release @discordjs/brokers@0.2.0 2023-04-02 01:49:13 +02:00
Noel
11e682cfe3 feat(core): http-only wrapper (#9281) 2023-04-02 01:44:19 +02:00
Vlad Frangu
9d69bba47c fix(core): include data for defer (#9284) 2023-04-02 01:38:33 +02:00
Jaw0r3k
2792e48119 docs: describe private properties (#8879)
* feat: describe private properties

* Update packages/discord.js/src/structures/GuildMember.js

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 23:21:53 +00:00
Jaw0r3k
384b4d10e8 docs: differ User#send (#9251)
* docs: differate user#send

* chore: format

* chore: remove some examples

* docs: add GuildMember#send example

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 23:17:54 +00:00
Jaw0r3k
d16114c526 docs: fix compare position example (#9272)
Update Role.js

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:37:18 +00:00
pkdev08
de1aac674a fix: add support for new guild feature GUILD_WEB_PAGE_VANITY_URL (#9219)
Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:34:07 +00:00
Jaw0r3k
79875658cf fix: resolving string bitfield (#9262)
fix: resolving bitfield

Co-authored-by: space <spaceeec@yahoo.com>
2023-04-01 22:30:51 +00:00
Jiralite
ab3328a0e2 chore: Include discord.js in the user agent string (#9267)
* chore: apply user agent string

* fix: enforce even in custom option

* fix: tests

* refactor: simpler way

* docs: add type

* Update packages/discord.js/src/client/BaseClient.js

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

* fix: prioritise `option` type check

* types: `static`

* feat: add runtime check

* docs: update default

* refactor: remove Bun

* Update packages/discord.js/src/client/BaseClient.js

Co-authored-by: Almeida <almeidx@pm.me>

* fix: extra whitespace issues

* refactor: `trimEnd()`

---------

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:26:44 +00:00
Jiralite
1864d37d36 fix(AutocompleteInteraction): Send name_localizations correctly (#9238)
fix(AutocompleteInteraction): send locale correctly

Co-authored-by: space <spaceeec@yahoo.com>
2023-04-01 22:19:23 +00:00
Tetie
f340f3b1fd refactor: call GuildBanManager#create() directly (#9263)
refactor: call bans.create directly

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:09:01 +00:00
Suneet Tipirneni
907eb1b470 feat(core): Add AbortSignal support. (#9042)
* feat: add abort signal to guilds api

* feat: add to application commands, channels, and users classes

* chore: finish up

* chore: centralize types

* chore: make requested changes

* chore: make requested changes

* refactor: consistently use empty objects

* Update packages/core/src/api/webhook.ts

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

* chore: make requested changes

* refactor: update `setVoiceState` after rebase

* chore: requested changes

* refactor: use -types interface for query

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-04-01 21:11:37 +00:00
iCrawl
e2f39ccc32 fix(website): migration from old website 2023-04-01 15:50:47 +02:00
Tetie
74a6d59ae9 chore: overhaul readmes (#9277)
Co-authored-by: Souji <timoqueezle@gmail.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-04-01 13:45:15 +02:00
iCrawl
a5b0d97224 fix(website): redirect for logo 2023-04-01 13:32:10 +02:00
iCrawl
52c6ea2fdb feat(website): add static logo 2023-04-01 13:15:27 +02:00
iCrawl
cfa48cedc3 fix(website): update url 2023-04-01 13:12:18 +02:00
iCrawl
cf23149d17 fix(website): make sure to use proper revalidate and per request caching 2023-04-01 03:12:12 +02:00
iCrawl
311cab2d3f build(website): build site from db data 2023-04-01 02:50:24 +02:00
Jiralite
34bc36ac4b feat(Guild): Add max_stage_video_channel_users (#8422)
feat(Guild): add `max_stage_video_channel_users`
2023-03-31 22:30:25 +00:00
ckohen
db8df104c5 fix(handlers): create burst handler for interaction callbacks (#8996)
* fix(handlers): create burst handler for interaction callbacks

* docs: use remarks instead of info block

Co-Authored-By: Almeida <almeidx@pm.me>

* refactor: move code duplication to shared handler

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

* Update packages/rest/src/lib/handlers/BurstHandler.ts

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-03-30 17:22:04 +00:00
Jiralite
984bd55b43 fix: Keep symbols in actions manager (#9293)
fix: keep symbols in actions manager
2023-03-29 17:27:23 +00:00
iCrawl
3cf4f4b317 ci: fix linting astro files 2023-03-28 23:10:41 +02:00
iCrawl
fd008f0144 ci: run specific version of node 2023-03-28 23:02:25 +02:00
iCrawl
8deef3e93f ci: fix docker image build 2023-03-28 22:55:28 +02:00
iCrawl
89235f32b0 ci: docker image build for proxy 2023-03-28 22:47:48 +02:00
Noel
47da24ff5c refactor(website): redesign (#9286) 2023-03-28 19:02:36 +02:00
iCrawl
d1ebe4a52c fix(website): right sidebar height 2023-03-27 20:50:35 +02:00
iCrawl
5cdd5d76ed fix(website): page height to hide footer without scrolling 2023-03-27 20:43:34 +02:00
iCrawl
b8b852ee1e feat(guide): light theme for syntax 2023-03-25 23:46:42 +01:00
iCrawl
ba93bc8141 chore: fixup root package.json 2023-03-25 22:55:53 +01:00
iCrawl
fbd599d586 refactor(guide): next 13 2023-03-25 22:52:47 +01:00
iCrawl
d9a9500b40 feat(website): optimize svg and priority load svg 2023-03-25 18:56:57 +01:00
iCrawl
51de9668e5 feat(website): feature flag package and version selection 2023-03-25 16:33:13 +01:00
iCrawl
b097b25116 fix(website): package / version select spacing 2023-03-25 14:55:15 +01:00
iCrawl
1d2c152320 fix(website): keys 2023-03-25 14:42:53 +01:00
iCrawl
d8d5f31d39 fix(scripts): accessing tsComment 2023-03-25 14:02:40 +01:00
Jiralite
abd6ae9fc8 fix(ClientUser): No mutation on edit (#9259)
fix(ClientUser): no mutation on edit

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-25 12:59:22 +00:00
iCrawl
44ef2d9485 fix(website): wrong bg color for buttons in pkg/version select 2023-03-25 13:52:51 +01:00
DD
519825a651 fix(WebSocketShard): don't await #destroy in error bubbling logic (#9276)
* fix(WebSocketShard): don't await #destroy in error bubbling logic

* fix: properly throw abort errors

* chore: vlad's nit

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-25 12:49:35 +00:00
iCrawl
ad31edc7aa refactor(website): font loading and reduce cls 2023-03-25 13:44:35 +01:00
Almeida
d6f4e60efd refactor(collection): fix/silence linter warnings (#9266)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-25 09:32:52 +00:00
iCrawl
5fcd0e48a8 fix(website): nav / member provider 2023-03-24 06:24:47 +01:00
iCrawl
52f8e0670c feat(website): color scheme / dark and light mode improvements 2023-03-24 06:02:00 +01:00
iCrawl
1c4af93898 feat(website): enhance lazy loading 2023-03-24 04:27:21 +01:00
iCrawl
3bd76078e1 feat(website): sneaky sneaky 2 2023-03-24 01:54:21 +01:00
iCrawl
71eba0e1b2 chore(website): sneaky sneaky 2023-03-24 00:30:14 +01:00
iCrawl
d284b8c64b chore: fix lockfile 2023-03-23 23:49:06 +01:00
iCrawl
795e6c363d fix(website): footer spacing 2023-03-23 23:46:37 +01:00
iCrawl
d6cd3fd7ed chore: deps 2023-03-23 23:24:27 +01:00
iCrawl
d144a78813 ci: add lighthouse for prod 2023-03-23 23:11:13 +01:00
iCrawl
645e2d3d6b ci: lighthouse score 2023-03-23 22:48:27 +01:00
iCrawl
5b745a49d8 chore(website): fix metadata 2023-03-23 22:37:50 +01:00
Suneet Tipirneni
ee5169e0aa feat(website): render syntax and mdx on the server (#9086) 2023-03-23 22:17:41 +01:00
Jiralite
bc641fa936 docs(Role): Fix example for comparePositionTo() (#9270)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-23 20:50:58 +00:00
Suneet Tipirneni
c8c02f957d fix(website): remove layout shift (#9062)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-03-23 20:44:04 +01:00
Suneet Tipirneni
091824abc5 fix(website): show headers for type aliases (#9054) 2023-03-23 20:42:29 +01:00
Suneet Tipirneni
03f5f1e3b6 refactor(website): use new metadata api instead of head.tsx (#9269) 2023-03-23 20:41:29 +01:00
iCrawl
852fae557e chore: deps 2023-03-23 14:28:58 +01:00
Rodry
5f93dcce46 feat: add GuildBasedTextChannelTypes (#9234)
* feat: add GuildBasedTextChannelTypes

* docs(GuildTextBasedChannels): distinguish from non other

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

* fix: spread correct array

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

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-22 22:03:44 +00:00
Erwan
22e880aaa0 fix(Message#editable): update editable check in threads locked (#9216)
* fix(Message#editable): update editable check in threads locked

* fix(Message#editable): add check in archived threads

* fix: check manage threads permission only if thread is locked

* fix: adding a full stop at the end of a sentence

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>

---------

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-22 21:38:32 +00:00
Jiralite
e9a8eb323f fix(ThreadManager): add members and conditionally include hasMore (#9164)
* fix(ThreadManager): conditionally include `hasMore`

* types: fix tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:24:09 +00:00
Jiralite
cc57563e73 fix(ThreadManager): Respect cache and force in fetching (#9239)
* fix(ThreadManager): Respect `cache` and `force` in fetching

* refactor: remove defaults

These are already defaulted down the line.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:20:52 +00:00
Jiralite
519e163f8a refactor(FetchThreadsOptions): Remove active (#9241)
* refactor(FetchThreadsOptions): remove `active`

* docs(FetchThreadsOptions): update description

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:17:47 +00:00
DD
eb81dc982c chore(ws): correct order for debug logs when identifying (#9248)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:13:56 +00:00
Tetie
bf507ab265 docs: add more examples (#9252)
* docs: add more examples

* fix: fix grammar and syntax

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

* chore: fine-tune examples

* chore: replace double quotes with singles

* fix: remove redundant example tag

* fix: fix timeout logging

* Update packages/discord.js/src/structures/GuildMember.js

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

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:09:41 +00:00
Jiralite
178c8dcfee docs(FetchArchivedThreadOptions): before respects archive_timestamp, not creation timestamp (#9240)
docs(FetchArchivedThreadOptions): correct `before` description

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 19:01:17 +00:00
Jiralite
56cf138e02 docs: Update APISelectMenuComponent (#9235)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 18:57:23 +00:00
Jiralite
950fc47234 ci: Lock ancient issues (#9257)
ci: use dessant/lock-threads@v4
2023-03-20 19:35:58 +00:00
DD
c76b17d3b3 fix(WebSocketShard): don't close in #destroy when status is connecting (#9254) 2023-03-20 19:20:48 +00:00
Jeroen Claassens
229ad077ff fix(rest): remove const enums in favour of regular enums (#9243)
* fix(rest): remove `const enum`s in favour of regular enums

The motivation is that `const enum` produces ambient const enums when
compiling which in turn causes issues with TypeScript 5.x when `verbatimModuleSyntax`
is enabled.

Furthermore, the generally accepted best practice is to avoid `const enum`s
when writing libraries. Can back this up with statements from TS maintainers
if needed, I know they made them, I just can't be bothered to find the GitHub
links lmao. @vladfrangu will probably be able to find those links much easier
than me as it was also the motivation to remove `const enum`'s from discord-api-types

* refactor(rest): restore `const enum` for internal enum

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-19 14:35:27 +00:00
Jeroen Claassens
2e8e95031c build: resolve issue with esbuild-plugin-version-injector not working (#9246)
The issue was two-fold.
First of all, tsup starts using swc when `emitDecoratorMetadata` and `@swc/core` is installed.
`@swc/core` is installed transiently, which still causes the problem.
Okay, sure, so we move the `emitDecoratorMetadata` option to just
`packages/builders/tsconfig.json` seeing as the other packages don't use decorators anyway.
But that still leaves solving the issue for builders. @vladfrangu ended
up finding out that there was a bug in how esbuild handles plugins causing
the esbuild-plugin-version-injector plugin to not get loaded. This is solved
in v1.1.0 where the content is also replaced using the `onEnd` hook, if it
wasn't replaced by `onLoad` yet.
2023-03-19 14:28:06 +00:00
DD
98420826bc fix(WebSocketShard): cancel initial heartbeat in destroy (#9244)
* fix(WebSocketShard): cancel initial heartbeat in destroy

* refactor: use try/catch/finally

* chore: add debug log
2023-03-18 19:32:50 +00:00
n1ck_pro
51edba78bc fix(TextBasedChannelTypes): add GuildStageVoice (#9232)
fix(TextBasedChannelTypes): add GuildStageVoice
2023-03-15 17:32:29 +00:00
Jiralite
41077c96b5 chore: release all packages (#9230)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-12 20:54:27 +00:00
Almeida
869153c3fd refactor: compare with undefined directly (#9191)
* refactor: compare with `undefined` directly

* fix: lint
2023-03-12 20:24:22 +00:00
DraftMan
955e8fe312 fix(snowflake): snowflakes length (#9144)
* fix(snowflake): fix snowflakes length

* fix(snowflake): fix length
2023-03-12 20:07:51 +00:00
Rodry
4458a13925 feat(Collector): add lastCollectedTimestamp (#9044)
* feat(Collector): add lastCollectedTimestamp

* docs: mark props as nullable

Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>

* refactor: assign property in constructor

---------

Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-12 19:59:09 +00:00
Jiralite
334a51240a fix: modify tsup extension (#9157)
fix: modify extension

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:49:43 +00:00
Suneet Tipirneni
dff131e8e4 refactor(core): move setVoiceState to GuildsAPI (#9228)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:37:56 +00:00
André Paulo
f5ec1cada5 docs(MessageManager): add clarification to fetch messages (#9222)
* docs(MessageManager): add clarification to fetch messages

[Discord's documentation](https://discord.com/developers/docs/resources/channel#get-channel-messages) mentions that you can only use before, after or around. This is not mentioned in D.JS documentation, and after some time trying to figure out why I was getting more messages than I should, decided to read the documentation.

* docs(MessageManager): remove mutually exclusive description

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:34:48 +00:00
DD
a99fc64e3f fix(WebSocketShard): #send race condition due to ready state (#9226)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:28:10 +00:00
DD
6ecff26ec6 feat(WebSocketShard): heartbeat jitter (#9223)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 19:24:35 +00:00
Jiralite
646b6ead7e chore(voice): release @discordjs/voice@0.15.0 (#9229)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2023-03-12 19:13:09 +00:00
Almeida
3492b194b5 types(MappedEvents): add GuildAuditLogEntryCreate (#9175)
* types(MappedEvents): add `GuildAuditLogEntryCreate`

* chore: sort interface alphabetically

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-12 18:15:54 +00:00
Suneet Tipirneni
1b29099ed0 fix(core): use auth: false for interaction callback methods (#9211)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-09 11:15:32 +00:00
Vlad Frangu
c6d98fa0c5 fix(Voice): send keep alives without awaiting a response (#9202) 2023-03-09 12:12:02 +01:00
Almeida
f65ac2ea78 docs: fix /core README example (#9201) 2023-03-09 12:09:44 +01:00
Vlad Frangu
a63ac88fcc fix(Actions): inject built data by using a symbol (#9203)
This fixes the hard crash encountered from message component interactions
where a `channel` property was added to them, causing hard crashes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-09 11:05:52 +00:00
Synbulat Biishev
4367ab9302 docs(EmbedBuilder#spliceFields): fix a typo (#9159)
fix(EmbedBuilder#spliceFields): fix a typo

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-05 22:42:35 +00:00
iCrawl
dc142c47e4 chore: regen yarn lock 2023-02-27 21:58:49 +01:00
iCrawl
1f86d8578a chore: deps 2023-02-27 21:55:46 +01:00
Synbulat Biishev
71a427f632 types: allow sending messages with SuppressNotifications flag (#9177) 2023-02-27 21:39:03 +01:00
Jaworek
664cccb270 docs: make interactionResponse as optional (#9179) 2023-02-27 21:38:03 +01:00
DD
27e0b32c5f fix(WebSocketShard): wait for hello rather than ready in connect (#9178) 2023-02-27 19:37:16 +00:00
Jaworek
ffdb197f98 feat(StageChannel): add messages (#9134)
* feat(StageChannel): add messages

* fix: missing implements jsdoc

* Apply suggestions from code review

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>

* Update packages/discord.js/src/util/Constants.js

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>

* feat: use common class

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* feat: add stage to text based channels + fix webhook.channel typings

* fix: some fixes

* Update packages/discord.js/src/structures/BaseGuildVoiceChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* Update packages/discord.js/src/structures/VoiceChannel.js

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

* Update packages/discord.js/src/structures/interfaces/TextBasedChannel.js

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

* Update packages/discord.js/src/structures/BaseGuildVoiceChannel.js

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

---------

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 15:03:18 +00:00
Jaworek
095bd77515 feat(AutoModerationActionExecution): add channel, user and member getters (#9142)
* feat(AutoModerationActionExecution): add channel prop

* feat(AutoModerationActionExecution): add user prop

* fix: sintax

* feat: add guildmember getter

* Apply suggestions from code review

Co-authored-by: Almeida <almeidx@pm.me>

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 14:41:10 +00:00
Synbulat Biishev
e78b8ad3fb fix(Message#deletable): add check for deletable message types (#9168)
* fix(Message#deletable): add check for deletable message types

* docs: update docs

* fix: add check for `AutoModerationAction` message

* style: better style

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 14:38:05 +00:00
Jiralite
c1000b86ed feat(AutoModeration): Support custom_message (#9171)
* feat: initial commit

* docs: fix type

* docs: this is probably a better explanation

* docs: optional

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-25 14:34:48 +00:00
Sugden
a9495bd8f0 fix(Message): bulkDeletable permissions should be retrieved later for DMs (#9146)
* fix(Message): permissions check should be done later

the getter will error if used on a message originating from a DM

* refactor: remove unessercary chaining
2023-02-25 14:21:53 +00:00
Jiralite
4e0e125039 refactor(GuildMemberManager): Tidy up fetching guild members (#8972)
* refactor(GuildMemberManager): tidy up fetching guild members

* refactor: no destructure

* fix: throw `nonce` error correctly

* refactor: simplify `resolve()` with ternary

* refactor: prioritise `nonce` check

* fix: allow single user

* refactor: do not use `null`

This is not documented to request over the gateway.

* refactor: better name

* fix: extract correct property
2023-02-21 20:36:25 +00:00
ckohen
6e481f0a30 ci: create publish release workflow (#9150)
* ci: create publish release workflow

* test: fix tests for formatTag

* ci(publish-release): fix string concat

* ci: release action runs with tag as source

* ci(publish-release): no longer testing

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-21 20:15:39 +00:00
Almeida
fd0246ca4c types: remove EscapeMarkdownOptions (#9153) 2023-02-21 20:11:33 +00:00
DD
9681f34877 fix(WebSocketShard): proper error bubbling (#9119)
* fix(WebSocketShard): proper error bubbling

* fix(WebSocketShard): proper success signaling from waitForEvent

* refactor(waitForEvent): better error bubbling behavior

* fix(WebSocketShard): still allow the first connect call to reject

* fix(WebSocketShard): handle potential once error in #send

* refactor(WebSocketShard): waitForEvent & bubbleWaitForEventError

* refactor: success signaling

* chore: bump async EE to allow overwriting the error event
2023-02-19 19:28:34 +00:00
ckohen
7f2ef962ec test: fix coverage reporting (#9148)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-19 18:59:35 +00:00
DD
5c5a5832b9 refactor(WebSocketManager): passing in strategy (#9122)
* refactor(WebSocketManager): passing in strategy

* chore: update tests

* chore: requested nits

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-19 18:57:31 +00:00
Mohamed Ashraf
c6f9c50ba9 feat(core): Adds getWebhooks() function for the channel API and for the guild API (#9043)
* feat(core): Adds `getChannel()` for webhooks

* feat(core): add `getWebhooks()` function for the channel and the guild

* Update packages/core/src/api/guild.ts

Co-authored-by: Almeida <almeidx@pm.me>

* Update packages/core/src/api/channel.ts

Co-authored-by: Almeida <almeidx@pm.me>

* Update packages/core/src/api/channel.ts

Co-authored-by: Almeida <almeidx@pm.me>

* Update packages/core/src/api/guild.ts

Co-authored-by: Almeida <almeidx@pm.me>

* Update packages/core/src/api/guild.ts

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

* Update packages/core/src/api/channel.ts

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

* sorting the types

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: space <spaceeec@yahoo.com>
2023-02-17 23:35:44 +00:00
Jiralite
765d5a3b2d feat(ThreadMemberManager): Support pagination fetching (#9035)
* feat: initial commit

* fix: `query`

* fix: `GuildMember` for `member`

* types(ThreadMember): constructor types

* fix: send API properties correctly

Co-authored-by: Almeida <almeidx@pm.me>

* docs(FetchThreadMembersOptions): update `cache` description

* fix: retrieve from option

Co-authored-by: Almeida <almeidx@pm.me>

* fix: fix fetch many

* types(FetchThreadMembersOptions): add `withMember`

* types: stricter types

* types: infer possible guild member

* chore: reference member in getter

* types: remove `<false>`

* style: remove line

* chore: markdown

* types: remove `?`

* docs: remove irrelevant part

* fix: prevent crash

* refactor: make `member` `@private`

It will be confusing to have `guildMember` and `member`, specially since the former accounts for the latter.

---------

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 22:14:36 +00:00
MrMythicalYT
dc9924fb5f feat(InteractionResponse): add new methods (#9132)
* feat(InteractionResponse): add new methods

* types: fix options parameter type

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>

* Update packages/discord.js/src/structures/InteractionResponse.js

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

* Update packages/discord.js/src/structures/InteractionResponse.js

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

* docs: add description for edit

---------

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 21:56:18 +00:00
net-tech
da23cd5d69 typings(Attachment): make attachment private (#8982)
* typings(Attachment): remove attachment property

* remove from structures

* Revert "remove from structures"

This reverts commit 88acb8d276.

* typings(attachment): make attachment private

---------

Co-authored-by: space <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 21:52:51 +00:00
Almeida
76b21162ac feat(GuildMember): add flags (#9087)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 21:09:49 +00:00
SKINMAKER
4e0a89f58f types: fix type of Attachment#name (#9101)
Co-authored-by: space <spaceeec@yahoo.com>
2023-02-17 20:33:08 +00:00
Almeida
483cbb3b2a fix(oauth2): pass through body (#9106)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:18:13 +00:00
Jiralite
9156a2889c fix(AutoModerationActionExecution): transform action (#9111)
* fix: transform action upon execution

* chore: move method into transformer

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:14:51 +00:00
Almeida
9439107a1d feat(Client): guildAuditLogEntryCreate event (#9058)
* feat(Client): `guildAuditLogEntryCreate` event

* feat: add `targetId` and `executorId`

* types: `ApplicationCommand` fix

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:11:52 +00:00
Lioness100
1ba1f238f0 docs: fix typos (#9127)
* docs: fix typos

* indicies -> indices

* rename file

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:07:38 +00:00
Almeida
6f78e8285b docs(chatInputApplicationCommandMention): parameters are not nullable (#9091)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:54:13 +00:00
Almeida
f268e1d979 fix(MessageReaction): toJSON() infinite recursion (#9070)
* fix(MessageReaction): `toJSON()` infinite recursion

* fix: return type

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>

---------

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:51:08 +00:00
Jiralite
1ba22f4c9e feat: Add role subscription data (#9025)
* feat: add role subscription data

* docs: specify message type

* types: use interface

* docs: add word

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:47:08 +00:00
Jiralite
0b76ab4c40 fix(ThreadChannel): insert starter message from threads created in forum channels (#9100)
fix(ThreadChannel): insert starter message from forums

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 19:43:21 +00:00
Almeida
f70df910ed refactor(BitField): reverse iterator/toArray responsibilities (#9118)
refactor(BitField): reverse iterator/toArray responsabilities
2023-02-17 19:40:10 +00:00
SkanePrime
b8684e0585 chore: fix \n breaks (#9116) 2023-02-17 20:36:40 +01:00
Aura Román
071516c352 fix(ApplicationRoleConnectionMetadata): export the class correctly (#9076) 2023-02-17 20:34:08 +01:00
Jiralite
d44a6f035c chore: bump discord-api-types and undici (#9140)
* chore: update discord-api-types to 0.37.35

* fix: exclude stage channels for now

* chore: update undici

* chore: dedupe undici
2023-02-17 19:17:08 +00:00
Jiralite
0e4224be36 ci: don't run issue triage on edit (#9113) 2023-02-08 22:00:26 +00:00
Jiralite
405f9400e8 docs: no @type description and reveal info block (#9097) 2023-02-04 13:05:09 +00:00
Synbulat Biishev
8b70f497a1 docs: fix version export (#9049)
* docs: fix version export

* types: assert `[VI]{{inject}}[/VI]` as string

* types: typo

* Revert "types: typo"

This reverts commit ba983f02be.

* types: typo

I hate my local repo. It can't install deps with `--immutable` and a have weird error on `yarn test`, but the CI passes
2023-01-19 15:56:57 +00:00
Suneet Tipirneni
56ef3ad8a0 ci: update scripts for documentation changes (#9055)
* ci: update scripts for documentation changes

* refactor: use tsconfig files

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-17 19:15:01 +00:00
Jiralite
2e48faf91a ci: Update issue labeller (#9064)
* ci: Add formatters issue label

* fix: "the" instead of "this"

* chore: add next
2023-01-17 18:54:56 +00:00
Cl00e9ment
13ce78af6e refactor: Moved the escapeX functions from discord.js to @discord.js/formatters (#8957)
* refactor: moved escapeX funcs from discord.js to @discord.js/formatters

- moved escapeX functions from discord.js to @discord.js/formatters
- converted code from JS to TS (including JSDoc and TSDoc)
- made linter happy
- modified the escapeHeading's RegExp to pass the RegExp safety test
- escapeBulletedList now conserves the bullet style (- or *)

* fix: removed useless exports and eslint command

removed useless exports and eslint command

* fix(escapeX): emojis with underlines

porting the fix made in 2c4c5c23d6 into the refactorization PR

Co-authored-by: space <spaceeec@yahoo.com>
2023-01-13 16:21:25 +00:00
widepeepoclap
b803a9a899 fix: don't auth for interaction showModal() (#9046)
Co-authored-by: space <spaceeec@yahoo.com>
2023-01-13 16:07:06 +00:00
Almeida
6a9875da05 feat(Sticker): add support for gif stickers (#9038)
* feat(Sticker): add support for gif stickers

* chore: upgrade discord-api-types

* refactor: requested changes
2023-01-13 15:29:35 +00:00
Parbez
8c265b628d ci: automated issue labeler (#8873)
* ci: automated issue labeler

* ci: remove comment

* Apply suggestions from code review

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

* ci: update labeler on new package

* chore: add core

* ci: add feature req too

* fix: update date

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-01-13 10:28:14 +00:00
Superchupu
1831acaffb chore: switch tsup config to typescript (#9057)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 09:44:56 +00:00
DD
05a1cbfe54 fix: ws typo (#9056)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 00:56:43 +00:00
Jiralite
1c871b5b57 refactor: Use deprecate() directly (#9026)
* refactor: just call `deprecate()`

* docs: prevent crash

* refactor: back to prototype deprecation
2023-01-12 20:38:31 +00:00
iCrawl
bb58395df0 chore: update yarn 2023-01-12 14:06:07 +01:00
Suneet Tipirneni
f6506e99c4 feat(website): add support for source file links (#9048)
Co-authored-by: Noel <buechler.noel@outlook.com>
2023-01-12 13:49:11 +01:00
iCrawl
a580768cda ci: remove unnecessary build step 2023-01-12 12:18:32 +01:00
Almeida
cb43db2180 fix(website): scroll to method when clicking anchor (#9047) 2023-01-12 12:17:12 +01:00
iCrawl
368b8ba73c ci: always upload bundle on main 2023-01-12 12:01:42 +01:00
iCrawl
d28af8eca7 ci: use pull request target for forks 2023-01-12 11:46:38 +01:00
iCrawl
4224d783bc ci: fix accessing the base branch bundle 2023-01-12 11:32:09 +01:00
iCrawl
3659e0de67 fix(website): checking if member is accessible 2023-01-12 11:28:13 +01:00
iCrawl
38e115b908 ci: make sure to run build command top-level 2023-01-12 11:15:23 +01:00
iCrawl
4cedc21dbb ci: build packages before building docs 2023-01-12 11:06:24 +01:00
iCrawl
8d327aa416 ci: make sure to build legacy docgen 2023-01-12 11:01:00 +01:00
iCrawl
0a0c7d32d6 ci: update read path for comment 2023-01-12 10:54:13 +01:00
iCrawl
a4f2f1b5a5 chore: deps 2023-01-12 10:36:48 +01:00
ckohen
859111f864 chore: init @discordjs/next (#8988)
Co-authored-by: Superchupu <53496941+SuperchupuDev@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Isidro Casiano <isidroICP@outlook.com>
2023-01-12 10:27:07 +01:00
iCrawl
4accb00b98 ci: only run documentation workflow if source files changes 2023-01-12 10:18:53 +01:00
iCrawl
41132b1049 fix(guide): astro config 2023-01-12 10:13:40 +01:00
iCrawl
e042492486 ci: fix nextjs bundle analysis 2023-01-12 09:44:07 +01:00
Almeida
2798ba1eb3 style: run prettier (#9041) 2023-01-12 09:23:02 +01:00
iCrawl
8dfd0037b5 chore: deps 2023-01-10 18:32:57 +01:00
DD
828a13b526 feat(ws): custom workers (#9004)
* feat(ws): custom workers

* chore: typo

* refactor(WebSocketShard): expose shard id

* chore: remove outdated readme comment

* chore: nits

* chore: remove unnecessary mutation

* feat: fancier resolution

* chore: remove unnecessary exports

* chore: apply suggestions

* refactor: use range errors

Co-authored-by: Aura Román <kyradiscord@gmail.com>
2023-01-10 17:31:56 +00:00
Suneet Tipirneni
39c4de2dbc refactor(website): extract layouts and use more server components (#9027)
Closes https://github.com/discordjs/discord.js/issues/8920
Closes https://github.com/discordjs/discord.js/issues/8997
2023-01-10 18:25:14 +01:00
Suneet Tipirneni
158db474b7 types: fix GuildsAPI#getMembers return type (#9037)
* types: fix GuildsAPI#getMembers return type

* chore: make requested changes
2023-01-10 16:03:54 +00:00
iCrawl
a995cbc0fa ci: build website correctly 2023-01-10 13:59:18 +01:00
iCrawl
7ab62b4bb7 ci: add nextjs bundle checker 2023-01-10 13:52:11 +01:00
Almeida
7dad50ee9a revert: fix(DMChannel): recipientId edge case (#9013)
Revert "fix(DMChannel): recipientId edge case (discordjs#8950)"

This reverts commit 7ce9909.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 09:59:49 +00:00
Jiralite
f3fe3ced62 docs(ThreadEditOptions): Move info tag back to invitable (#9020)
docs(ThreadEditOptions): move info tag to correct property
2023-01-10 09:53:38 +00:00
DD
ecb4281d1e fix(RequestManager): inference of image/apng (#9014)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 15:23:11 +00:00
DD
0ff67d8e7a feat(ws): metrics (#9005)
* feat(WebSocketManager): fetch status

* feat(WebSocketShard): heartbeat event

* chore: ci

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 12:00:47 +00:00
DD
e8b7504352 chore: remove proxy dep hack (#9006)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 11:56:59 +00:00
Jiralite
0076589ccc feat(GuildAuditLogs): Support after (#9011)
* feat(GuildAuditLogs): support `after`

* refactor: remove variables

They were only being used once each.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-06 11:46:20 +00:00
Suneet Tipirneni
816aed478e feat(core): implement some ws send events (#8941)
* feat(core): implement some ws send events

* fix: check guild id and add a timeout

* fix: only check for nonce

* chore: update readme

* chore: make requested changes

* chore: make methods consistent

* chore: fix readme example

* chore: move shard ID calculation to util

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-05 22:06:50 +00:00
Almeida
3407e1eea3 feat: add role subscriptions (#8915)
* feat: add role subscriptions

* docs: casing

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

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2023-01-04 00:39:31 +00:00
Jiralite
7dec892218 types: Allow builders to set channel types in discord.js (#8990)
types: allow builders to set channel types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-02 15:24:10 +00:00
iLxlo_
6d7a143667 docs: Fix a typo in the MentionableSelectMenuInteraction link (#9000) 2023-01-02 16:18:07 +01:00
Jiralite
be294eaf99 feat: Add not_found to guild member chunk data (#8975)
* feat: add `not_found` to chunk data

* docs: consistency

* types: export `JSONValue`

* refactor: move into typedef area

* refactor: prefer unknown

* docs: fix parsing

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-02 11:55:06 +00:00
Voxelli
876b181312 fix(WebSocketShard): Zombie connection fix (#8989)
* fix: zombie connection
- Fix backport #7626 missing changes
- Reverted the pull request #8956
- Removed unref of wsCloseTimeout
- We are resuming the connection for zombie instead of starting a new

Co-authored-by: DraftMan <nicovanaarsen@gmail.com>

* refactor: ♻️ Format code and remove useless assignation

Co-authored-by: DraftMan <nicovanaarsen@gmail.com>
2023-01-01 17:49:20 +00:00
Jiralite
d3e9f2a355 refactor(Guild): Destructure object in guild editing (#8971)
* refactor: simplify guild editing

* chore: remove strange rule modification

* refactor: destructure more!

* refactor: remove pattern, allow `0` bit

* refactor: spread

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:37:18 +00:00
Jiralite
ad49845260 types: Swap message reaction and emoji identifier types (#8969)
* types: swap message reaction and identifier types

* docs: reflect changes

* types: simplification

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:33:01 +00:00
Jiralite
d7a09f6fce refactor(GuildManager): Better handling of creation code (#8974)
* refactor(GuildManager): tidy up guild creation

* refactor: emit once only

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

* fix: allow `0`/`0n`

* refactor: modify name

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:29:56 +00:00
Jiralite
2e22b31892 docs(ApplicationRoleConnectionMetadata): Add documentation (#8976)
docs: show `ApplicationRoleConnectionMetadata`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:26:29 +00:00
Almeida
f89a164bac fix(website): package selector page height on small devices (#8953)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:23:08 +00:00
Cl00e9ment
4ee00b6534 docs: updated @discordjs/ws README.md to include optional packages (#8973)
* docs: updated ws's readme to include optional packages

- added optional packages to the README.md
- added an example on how to add a listener to the ws manager, in the README.md

* docs: changed "addEventListener" to "on" in ws's readme

changed "addEventListener" to "on" in @discord.js/ws README.md

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:20:36 +00:00
Jaworek
d8dd197a93 fix: keep other properties in triggerMetadata (#8977)
fix: keep other properties

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-31 00:17:20 +00:00
Ben
898b5ac416 typings(widget): add missing name (#8978)
typings(widget): add missing name
2022-12-31 00:12:27 +00:00
Suneet Tipirneni
3160ab0fc7 chore: use generator for range utility (#8825)
* chore: use generator for range utility

* chore: update doc examples

* chore: fix spelling

* chore: fix typo

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:43:58 +00:00
Almeida
a6941d536c feat(StringSelectMenu): add spliceOptions() (#8937)
* feat(StringSelectMenu): add `spliceOptions()`

* fix: requested changes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:38:28 +00:00
MrMythicalYT
bec51de103 types: use StringSelectMenuOptionBuilder (#8949)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:35:09 +00:00
MrMythicalYT
5915f39810 types: fix actions type in automod (#8962)
* types(AutoModerationRuleCreateOptions): fix actions type

* types: update setActions

* docs: use array type for actions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:31:59 +00:00
Suneet Tipirneni
5dc5e90268 types: subcommand group options is required (#8966)
types: sub-command group options is required

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:27:44 +00:00
Almeida
07b597df16 fix(escapeX): emojis with underlines (#8945)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 20:04:26 +00:00
Suneet Tipirneni
36560c9955 feat(core): add oauth2 api support (#8938)
* feat(core): add oauth2 api support

* chore: remove return tag

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-25 19:53:56 +00:00
Qjuh
43ce2a572e fix(WebSocketShard): either start close timeout or emit destroyed but never both (#8956)
* fix(WebSocketShard): only close timeout or destroy

* Remove optional chaining

Co-authored-by: Voxelli <69213593+legendhimself@users.noreply.github.com>

Co-authored-by: Voxelli <69213593+legendhimself@users.noreply.github.com>
2022-12-25 19:05:19 +00:00
Almeida
22e2bbb0d2 feat(ClientApplication): add role connections (#8855)
* feat(ClientApplication): add role connections

* fix: constructor and edit types

* fix: rename typedef

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 08:00:39 +00:00
Almeida
7ce990954e fix(DMChannel): recipientId edge case (#8950)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 07:42:53 +00:00
Jiralite
0b8b114761 docs: Fix malformed overridden documentation (#8954)
* docs: override `resolve()` & `resolveId()`

* docs(CategoryChannel): move `setParent()` up

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 07:35:32 +00:00
MrMythicalYT
6614603326 fix: return only boolean for disabled (#8965)
* fix: return only boolean for `disabled`

* fix: return only boolean for `disabled`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-24 07:29:32 +00:00
Synbulat Biishev
153352ad7a types: add generic to ActionRowBuilder.from() (#8414)
* types: add generic to `ActionRowBuilder#from()`

* test: add tests for `ActionRowBuilder.from()`

* tests: add more tests
2022-12-23 19:57:20 +00:00
Almeida
429dbccc85 feat(CommandInteractionOptionResolver): add channelTypes option to getChannel (#8934)
* feat(CommandInteractionOptionResolver): add `channelTypes` option to `getChannel`

* fix: thread types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-20 20:32:45 +00:00
Almeida
25c27eac14 fix: export missing escapeX() functions (#8944)
fix: export missing escapeX functions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-20 16:20:43 +00:00
Qjuh
5eab5fc06c fix(WebSocketShard): only cleanup the connection if a connection still exists (#8946)
fix(WebSocketShard): only cleanup if connection
2022-12-18 15:18:07 +00:00
iCrawl
0cf29abcf0 chore(formatters): release @discordjs/formatters@0.1.0 2022-12-17 16:54:06 +01:00
Jiralite
dd62be077d docs(GuildForumThreadManager): Fix sticker type (#8940) 2022-12-16 18:20:11 +01:00
Jiralite
83eafb6146 chore: Add backport label (#8942) 2022-12-16 18:19:44 +01:00
Almeida
18b3a19810 fix: add @discordjs/formatters to dependency list (#8939) 2022-12-16 17:56:29 +01:00
Almeida
c76e170786 fix(resolveColor): invalid colors (#8933)
Fixes https://github.com/discordjs/discord.js/issues/8932
2022-12-16 14:28:18 +01:00
Almeida
cbafd479b3 feat(ForumChannel): add defaultForumLayout (#8895)
* feat(ForumChannel): add `defaultForumLayout`

* fix: lockfile
2022-12-16 13:27:11 +00:00
iCrawl
19519ec9fc chore(core): release @discordjs/core@0.3.0 2022-12-16 14:10:45 +01:00
iCrawl
166f742d02 fix(core): instantiate/export role connections 2022-12-16 14:09:51 +01:00
iCrawl
7a61004627 chore(core): release @discordjs/core@0.2.0 2022-12-16 03:59:25 +01:00
iCrawl
82f4827ee5 chore(ws): release @discordjs/ws@0.6.0 2022-12-16 03:55:39 +01:00
iCrawl
e470e088ab chore(rest): release @discordjs/rest@1.5.0 2022-12-16 03:53:13 +01:00
Suneet Tipirneni
3d6fa248c0 feat(core): Add support for role connections (#8930) 2022-12-16 03:32:00 +01:00
Suneet Tipirneni
273ba45e27 chore: use satisfies where applicable (#8884)
* chore: use satisfies where applicable

* chore: remove unneeded eslint ignores

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-16 02:12:38 +00:00
Suneet Tipirneni
7a5134459c feat: add support for nsfw commands (#7976)
* chore: update

* fix: add edit changes

* chore: make requested changes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-16 02:04:56 +00:00
Tristan Camejo
6540914b4a refactor(sharding): use switch statement (#8928) 2022-12-15 08:07:28 +00:00
Ben
627511d652 feat(InteractionResponse): createdTimestamp (#8917)
* feat(InteractionResponse): createdTimestamp

* feat(InteractionResponse): createdTimestamp

* Apply suggestions from code review

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>

Co-authored-by: MrMythicalYT <91077061+MrMythicalYT@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-14 21:35:40 +00:00
MrMythicalYT
a7b55c1460 refactor: use consistent naming for options (#8901)
* refactor: use consistent naming for options

* chore: update param names in typings

* chore: update forgotten `data` param

* Update packages/discord.js/src/structures/Guild.js

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

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-14 21:32:38 +00:00
Jiralite
1b151db59c refactor(CommandInteractionOptionResolver): Loosen mentionable checks (#8910)
refactor(CommandInteractionOptionResolver): loosen mentionable checks

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-14 21:29:29 +00:00
Qjuh
aa8c57dab6 fix(WebSocketShard): clear listeners on reconnect (#8927) 2022-12-14 21:23:20 +00:00
muchnameless
b14604abde fix: re-export formatters (#8909)
* fix: re-export formatters

* future-proof typings

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-12 08:49:24 +00:00
Almeida
73300c75fa feat: add links to each routes documentation (#8898) 2022-12-07 16:32:55 +00:00
Almeida
3dede75621 fix(thread): get() route (#8897)
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-07 14:27:01 +00:00
Almeida
3f555d5ddf feat(interactions): add messageId parameter to deleteReply() (#8896) 2022-12-07 14:23:42 +00:00
Jiralite
976b234e9d docs: Fix deprecated links (#8907)
docs: fix malformed deprecated descriptions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-06 16:30:48 +00:00
MrMythicalYT
c48ff5e420 docs(UserFlagsBitField): make .Flags static (#8902)
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-12-06 16:27:12 +00:00
Jiralite
6acf759f63 fix: Deprecate workflow fix (#8903)
fix: deprecate workflow fix

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-06 10:29:35 +00:00
iCrawl
fb70df817c ci: fix ref name 2022-12-03 17:05:37 +01:00
iCrawl
86959bad49 chore: update next 2022-12-03 10:43:51 +01:00
iCrawl
a0d6bc49c6 refactor: remove revalidation 2022-12-02 19:09:58 +01:00
MrMythicalYT
45faa19982 feat(Guild): add disableInvites method (#8801)
* feat(GuildInviteManager): add setDisabled method

* fix: formatting

* refactor: move helper method to `Guild`

* fix: rename method

* fix: add newline before jsdoc

* fix: remove disallowed trailing space

* Update packages/discord.js/src/structures/Guild.js

Co-authored-by: Hackerboi 69 <62872992+thehackerboi69github@users.noreply.github.com>

Co-authored-by: Hackerboi 69 <62872992+thehackerboi69github@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-12-02 13:21:59 +00:00
DD
8f552a0e17 refactor(WebSocketShard): identify throttling (#8888)
* refactor(WebSocketShard): identify throttling

* chore: add worker handling

* refactor: worker handling

* chore: update tests

* chore: use satisfies where applicable

* chore: add informative comment

* chore: apply suggestions

* refactor(SimpleContextFetchingStrategy): support multiple managers
2022-12-02 13:04:09 +00:00
Suneet Tipirneni
3fca638a84 feat: add @discordjs/formatters (#8889)
* feat: add @discordjs/formatters

* chore: make requested changes

* chore: make requested changes

* chore: fix other places

* chore: make requested changes

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-02 12:55:00 +00:00
iCrawl
4e4cbb3418 fix: revalidate on page level instead 2022-12-02 11:31:59 +01:00
iCrawl
52f56d3c2e chore: deps 2022-12-01 21:01:19 +01:00
DD
40b504a208 fix(WebSocketShard): send ratelimit handling (#8887)
* fix(WebSocketShard): send ratelimit handling

* chore: remove unnecessary else

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:58:00 +00:00
iCrawl
322cb99049 chore(discord.js): release discord.js@14.7.1 2022-12-01 11:53:40 +01:00
Jiralite
11d195d04f fix: Prevent crash on no select menu option (#8881)
* fix: no crash on no option

* refactor: consistency in ??

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:49:14 +00:00
Almeida
f13ff5c6d3 feat(createPackage): sort label files (#8892)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:02:44 +00:00
Jiralite
5e4331062b chore: Add brokers to package list and labels in issue forms (#8893)
chore: add brokers and sort list

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-12-01 10:00:04 +00:00
Almeida
fff3602a8a fix(createPackage): invalid label/path on labeler file (#8891)
* fix(createPackage): invalid label/path on labeler file

* fix: `packages:ui` label
2022-12-01 09:55:31 +00:00
iCrawl
72c30d1578 revert: theme fix 2022-11-30 04:41:07 +01:00
iCrawl
2cb1000a3a fix: move back to old theming 2022-11-30 04:34:47 +01:00
iCrawl
8a39c14921 fix: generate correct paths after moving catch-all 2022-11-30 04:26:40 +01:00
iCrawl
4ae029dfe2 fix: path generation 2022-11-30 04:16:27 +01:00
iCrawl
2849af0118 refactor: correctly generate routes 2022-11-30 03:55:23 +01:00
iCrawl
90d192078f fix: generate paths 2022-11-30 03:17:47 +01:00
iCrawl
b0f9b9c344 fix: next-themes 2022-11-30 02:22:00 +01:00
iCrawl
6bcebd4867 fix: including readme files 2022-11-29 01:06:02 +01:00
iCrawl
1efa95337f fix: dynamicParams bug 2022-11-29 00:36:23 +01:00
iCrawl
2f4bdf7394 fix: remove output file tracing option 2022-11-29 00:20:23 +01:00
iCrawl
4b9b62416b fix: reading readme files 2022-11-29 00:10:01 +01:00
iCrawl
208378b214 chore: fix changelog 2022-11-28 23:19:34 +01:00
iCrawl
6e65b45b31 chore(discord.js): release discord.js@14.7.0 2022-11-28 23:00:38 +01:00
iCrawl
2b260bd4bb chore: deps 2022-11-28 22:53:19 +01:00
iCrawl
cab692409d chore(voice): release @discordjs/voice@0.14.0 2022-11-28 22:51:40 +01:00
iCrawl
0fe503b516 chore(ws): release @discordjs/ws@0.5.0 2022-11-28 22:50:16 +01:00
iCrawl
999bc2069e chore(proxy): release @discordjs/proxy@1.2.1 2022-11-28 22:48:38 +01:00
iCrawl
b89bd6f67c chore(rest): release @discordjs/rest@1.4.0 2022-11-28 22:46:13 +01:00
iCrawl
5235ad5bfe chore(collection): release @discordjs/collection@1.3.0 2022-11-28 22:44:33 +01:00
iCrawl
3bd8458e09 chore(builders): release @discordjs/builders@1.4.0 2022-11-28 22:41:50 +01:00
iCrawl
44696c0a6a chore(brokers): release @discordjs/brokers@0.1.0 2022-11-28 22:39:02 +01:00
iCrawl
b5d8b69452 chore: deps 2022-11-28 22:33:21 +01:00
Almeida
7430c8e4c8 fix: remove casts when using makeURLSearchParams() (#8877) 2022-11-28 22:22:02 +01:00
Suneet Tipirneni
1a10f48bc3 feat(website): add link to discord-api-types (#8866)
fix: merge conflicts

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-28 18:18:26 +00:00
Jiralite
e592852e42 ci: Fix typo for /core labels (#8878) 2022-11-28 19:15:10 +01:00
Aura Román
8376e2dbcd refactor: update makeURLSearchParams to accept readonly non-Records (#8868) 2022-11-28 09:20:27 +01:00
Jiralite
ed68a1af5b chore: Update /core constants (#8874) 2022-11-28 09:14:16 +01:00
iCrawl
ebf9991df7 fix: readd react-use alias for astro 2022-11-28 06:13:53 +01:00
iCrawl
31e67c4316 build: smaller bundle size for websites 2022-11-28 05:55:08 +01:00
iCrawl
2f4bfedca1 chore: deps 2022-11-28 03:39:50 +01:00
Suneet Tipirneni
2127b32d26 feat: Add @discordjs/core (#8736)
* feat: add @discordjs/core

* chore: lint

* chore: add all gateway events

* chore: add the rest of the rest routes

* chore: cleanup gateway

* chore: rename gateway to client

* chore: rename gateway to client

* fix: don't spread unless we need to

* refactor: use classes and make requested changes

* chore: show shardId on emit

* chore: add interface for intrinsic props

* refactor: scope dispatch data instead of spreading

* chore: add utility for uploading files for messages and interactions

* feat: finish up form data handling

* chore: add readme

* chore: update api-extractor stuff

* chore: bump deps

* chore: make requested changes

* chore: make requested changes

* Update package.json

* chore: make requested changes

* fix: add missing interaction responses

* chore: make some requested changes

* chore: remove `return await`

* chore: use autoModeration instead of automod

* refactor: use snowflakes and -types results

* chore: sort imports, fix return type on editUserVoiceState

* chore: rename bots to users

* feat: add automod dispatch events

* refactor: move templates and members into guild

* fix: use users instead of bots in api class

* chore: imports

* chore: make requested changes

* fix: don't make files required on interaction replies

* fix: rename sendMessage to createMessage

* feat: add application command routes

* feat: add webhook.execute overloads and options to invites.get

* chore: use create prefixes

* chore: seperate interaction params

* chore: use Id

* chore: make requested changes

* chore: make requested changes

* chore: make requested changes

* chore: for -> from

* Apply suggestions from code review

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

* Update packages/core/README.md

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

* chore: make requested changes

* chore: update -types

* chore: bump vitest

* fix: sticker uploading

* fix: lockfile

* chore: make requested changes

* chore: make requested changes

* Update packages/core/src/api/applicationCommands.ts

Co-authored-by: Almeida <almeidx@pm.me>

* Apply suggestions from code review

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

* Update packages/core/README.md

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

* Apply suggestions from code review

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

Co-authored-by: almeidx <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-27 21:23:13 +00:00
Suneet Tipirneni
12553da135 feat(website): add app dir (#8869)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-11-27 16:24:34 +01:00
MrMythicalYT
decbce4010 feat(Webhook): add channel property (#8812)
* feat(Webhook): add `channel` property

* fix: allow ForumChannel type

* fix: disallow thread channel type

* fix: formatting

* Apply suggestions from code review

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-11-26 13:31:05 +01:00
iCrawl
9922151266 refactor: docker image for proxy-container 2022-11-26 02:09:05 +01:00
iCrawl
f0120538bb build: better turbo config 2022-11-26 02:07:56 +01:00
Suneet Tipirneni
650f4ddfb2 feat(guide): add next and previous page buttons (#8777) 2022-11-25 21:49:36 +01:00
iCrawl
56d086022f ci: fetch all branches 2022-11-25 20:13:03 +01:00
iCrawl
909a02e2ad ci: test changes 2022-11-25 19:57:50 +01:00
iCrawl
ac0851b5b1 ci: fetch with a depth of 5 2022-11-25 19:55:45 +01:00
iCrawl
1ef42e4e7b chore: nextjs 13 changes 2022-11-25 19:33:30 +01:00
iCrawl
db346e014f ci: don't forward filter option 2022-11-25 19:19:57 +01:00
iCrawl
8f5b167483 build: only run scripts on changed content 2022-11-25 19:15:44 +01:00
MrMythicalYT
ec37f137fd types(Formatters): allow boolean in formatEmoji (#8823)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:42:48 +00:00
Almeida
f9828034cd fix(MessageMentions): add InGuild generic (#8828)
fix(MessageMentions): add InGuild generic

Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:35:52 +00:00
Jaworek
cb77fd02d0 docs: describe InteractionEditReplyOptions (#8840)
* docs: add 'description' to interactionreplyoptions

* Update packages/discord.js/src/structures/interfaces/InteractionResponses.js

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:26:33 +00:00
Eejit
7e06f68185 fix(Activity): Fix equals() not checking for differing emoji (#8841)
* Fix presence updating

* Update packages/discord.js/src/structures/Presence.js

Co-authored-by: Almeida <almeidx@pm.me>

* Update Presence.js

* Better emoji checking

* Revert "Better emoji checking"

This reverts commit 44d52bfde8.

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-25 17:17:55 +00:00
Jiralite
d2754802cc docs(AutoModerationRuleManager): Describe cache (#8848)
docs(AutoModerationRuleManager): describe cache
2022-11-25 15:24:19 +00:00
Suneet Tipirneni
7ae0c529f2 chore(scripts): cleanup create-package script (#8862)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-11-25 15:36:04 +01:00
iCrawl
7332b7bae3 chore: switch order of vite plugins 2022-11-25 14:43:30 +01:00
iCrawl
33a82b7bce chore: next 13 2022-11-25 14:29:32 +01:00
Jeroen Claassens
d0c82561b8 fix: fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861) 2022-11-25 14:02:18 +01:00
iCrawl
256677b435 chore: deps 2022-11-23 09:34:56 +01:00
iCrawl
ee7d2fd4c8 chore: deps 2022-11-22 13:35:47 +01:00
Jiralite
65bc0adbf4 docs: Fix message action row components (#8819)
* docs: fix message action row components

* docs: remove unused external links

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 22:20:49 +00:00
Jiralite
fd4ba5eaba feat: Auto Moderation (#7938)
* feat: initial AutoMod commit

* types: Typo in class name

Co-authored-by: Jonathan <54381371+axisiscool@users.noreply.github.com>

* refactor: move things around

* refactor: remove undocumented property

* chore: add new intents to issue form

* feat: add initial basic manager

* feat(AutoModRule): add new properties

* feat: add events

* feat(GuildAuditLog): cache rules

* refactor: move JSDoc to where it is actually used

* refactor(AutoModRule): add `_patch()` method

* feat(AutoModRuleManager): add resolvers

* feat(Sweepers): add new manager

* types: nullify first parameter of `autoModerationRuleUpdate`

* types: add manager to `Caches`

* docs(AutoModRule): update `metadata` docstring

* feat: add execution event

* fix(AutoModActionExecution): export class

* refactor(AutoModRule): `triggerType` is not modifiable

* docs(AutoModRule): link class

* feat: add trigger metadata definitions

* docs(AutoModRule): typos

* feat(AutoModRule): action metadata

* types: Proper casing of name

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>

* refactor: only patch data if exists

* types: `preset` is an array

* types(AutoModRuleActionMetadata): nullify all

* feat(AutoModRuleManager): add `fetch()`

* docs(AutoModRule): tweak some wording

* docs(AutoModRule): use "array" over "list"

* docs(AutoModRuleResolvable): fix union

* types: adjust some names

* feat(AutoModRuleManager): add `create()`

* feat(AutoModRuleManager): add `delete()`

* refactor: prefer full auto moderation name

* docs(AutoModerationRuleManager): fix a fetch example

* refactor(Sweepers): alphabetise methods

* chore: remove testing

* fix(AutoModerationRuleCreateOptions): add `reason`

* fix: typo for `presets`

* fix(AutoModerationRuleCreateOptions): `actions` is required

* fix(AutoModerationRuleManager): handle properties that are unrequired

* feat(AutoModerationRuleManager): add `edit()`

* feat(GuildAuditLogsEntry): add auto moderation rules

* refactor: prefer "AutoModerationActionExecutionAction"

* refactor: annotate todos and doc fixes

* feat(AutoModerationRule): add guild getter

* docs(AutoModerationRule): rule -> auto moderation rule

* docs(AutoModerationRuleEditOptions): `eventType` is optional

* feat(AutoModerationRule): add helpers

* docs: random string updates

* chore: add TODOs

* feat(AutoModerationActionExecution): add helpers

* feat: support role and channel resolvables

* chore: high priority todo to keep me in solitary

* refactor(AutoModerationActionMetadataOptions): allow resolvables

* chore: tidy up from merge

* docs(AutoModerationRule): document extension

* feat: export `AutoModerationRuleManager`

* chore(ActionsManager): add new actions

* chore: add to websocket index

* refactor(AutoModerationActionExecution): send the guild across

* docs(AutoModerationActionExecution): typo

* docs(AutoModerationRule): deduplicate a word

* docs(Guild): dot

* test: add some basic tests

* docs(AutoModerationRuleManager): fetch is optional

* docs(AutoModerationActionExecution): prefer non-links

* types: `presets` is an array of numbers

* docs(AutoModerationRuleEditOptions): `name` is optional

* docs(AutoModerationRule): fix type for `exemptChannels`

* docs(AutoModerationRuleUpdateAction): remove "object"

* feat: add `allow_list`

* fix(GuildAuditLogsEntry): pass guild

* docs(AutoModerationRuleManager): correct fetch example

* chore: prettier

* refactor: remove unneeded optional chaining operator

* feat: add mention limit

* docs(AutoModerationRuleManager): document new requirement

* refactor: conform to message content intent

* docs: document permission for event

* docs: refactor intent message

* docs: dot

* docs: remove string in link

* refactor: document upstream changes

* fix(AutoModerationRuleDelete): Correct event fire

Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com>

* feat(AutoModerationRule): Add `setMentionTotalLimit()` helper method

* feat(AuditLogEntries): add new extra fields

* types: add `guild` in constructors

* types: update typings

* refactor(AutoModerationRuleManager): `&&` shorthand

* types: remove leftover type

* chore: types

* docs: update API types

* docs: Tweak guild wording

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

* feat: add regular expression matching

* docs: update `allowList` wording

* refactor: deduplicate `guildId`

Co-authored-by: Jonathan <54381371+axisiscool@users.noreply.github.com>
Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>
Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-11-19 22:06:13 +00:00
Almeida
153d2403ad chore: turbo cache coverage (#8836)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:59:06 +00:00
Jiralite
8ed5c1beb6 docs: Specify ActionRowBuilder for components (#8834)
docs: `ActionRowBuilder` for `components`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:50:04 +00:00
MrMythicalYT
09f65b724b docs: add @extends for select menu classes (#8824)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:43:00 +00:00
Synbulat Biishev
291f36cd73 feat: add Collection#subtract() (#8393)
* feat: add `Collection#missing()`

* test: add test for `Collection#missing()`

* chore: rename `missing` to `complement`

* docs: fix name

* test: fix test name

Co-authored-by: Almeida <almeidx@pm.me>

* chore: sort alphabetically

* fix: edit condition

Co-authored-by: Almeida <almeidx@pm.me>

* refactor: rename to `subtract`

* docs: fix description

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

* fix: change condition

* fix: resolved eslint formatting error

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-11-19 21:34:26 +00:00
Jaworek
b2fabd130a feat(SelectMenuInteractions): add values property (#8805)
* fix: add values property

* fix: improve wording

* Update packages/discord.js/src/structures/MentionableSelectMenuInteraction.js

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

Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:27:14 +00:00
Suneet Tipirneni
abefc4f809 docs: add section on testing local changes (#8802)
* docs: add section on testing local changes

* chore: use the root command for watching

* Update .github/CONTRIBUTING.md

Co-authored-by: Almeida <almeidx@pm.me>

* Update .github/CONTRIBUTING.md

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

* Update .github/CONTRIBUTING.md

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

* Update .github/CONTRIBUTING.md

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

Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:17:19 +00:00
RedGuy12
d6873b7159 fix(escapeMarkdown): fix double escaping (#8798)
* fix(escapeMarkdown): fix double escaping

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* remove cruft

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:08:33 +00:00
RedGuy12
017f9b1ed4 fix(Transfomers): call .toJSON in toSnakeCase (#8790)
* fix(Transfomers): call `.toJSON` in `toSnakeCase`

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* fix: move it under the Date check

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* fix(toSnakeCase): stop assuming `toJSON` returns snake_case values

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 21:01:41 +00:00
Idris
e74aa7f6b0 feat(ThreadChannel): add a helper for pin and unpin (#8786)
* feat(ThreadChannel): add a helper for pin and unpin

* fix: remove erros

* Update packages/discord.js/src/structures/ThreadChannel.js

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

* Update packages/discord.js/src/structures/ThreadChannel.js

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

* Update packages/discord.js/src/structures/ThreadChannel.js

Co-authored-by: Almeida <almeidx@pm.me>

* Update packages/discord.js/src/structures/ThreadChannel.js

Co-authored-by: Almeida <almeidx@pm.me>

* Update packages/discord.js/typings/index.d.ts

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

* docs(ThreadChannel): improve description

* types(ThreadChannel): fix types

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-19 20:54:43 +00:00
Synbulat Biishev
ff85481d3e feat: add Message#bulkDeletable (#8760)
* feat: add `Message#bulkDeletable`

* feat: add requested changes

* fix: add check for `ManageMessages` permission

* fix: `.permissionsFor()` exist only in guild channels

* feat: apply requested changes

* types: add type

* fix: do not return `undefined`

* fix: add property to docs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-06 03:51:34 +00:00
Jaworek
68c9cb37bc docs: make WebSocketShard.lastPingTimestamp public (#8768)
Make WebSocketShard.lastPingTimestamp public
2022-11-02 13:29:53 +00:00
DD
5152abf728 feat: new select menus (#8793)
* feat(builders): new select menus

* chore: better re-exporting of deprecated classes

* feat: new select menus

* chore: typings

* chore: add missing todo comment

* chore: finish updating tests

* chore: add runtime deprecation warnings

* chore: format deprecation warning

* feat(BaseInteraction): isAnySelectMenu

* chore: requested changes

* fix: deprecation comments

* chore: update @deprecated comments in typings

* chore: add tests for select menu type narrowing

* fix: bad auto imports

Co-authored-by: Julian Vennen <julian@aternos.org>

* fix: properly handle resolved members

* fix: collectors

* chore: suggested changes

Co-authored-by: Almeida <almeidx@pm.me>

* fix(typings): bad class extends

* feat(ChannelSelectMenuBuilder): validation

* chore: update todo comment

* refactor(ChannelSelectMenu): better handling of channel_types state

* chore: style nit

* chore: suggested nits

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

Co-authored-by: Julian Vennen <julian@aternos.org>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-01 17:36:05 +00:00
MrMythicalYT
8b400ca975 feat(InteractionResponses): add message parameter (#8773) 2022-10-31 19:04:42 +01:00
Saya
88cd9d9060 feat: support resume urls (#8784)
Co-authored-by: Almeida <almeidx@pm.me>
2022-10-31 19:03:51 +01:00
ckohen
5a70057826 fix(SequentialHandler): downlevel ECONNRESET errors (#8785) 2022-10-31 19:03:38 +01:00
Almeida
0bcc18a0bd fix(brokers): publish the scripts folder (#8794) 2022-10-31 19:01:49 +01:00
Gabriel Thomé
b5213664fa feat: allow punctuation characters in context menus (#8783)
Co-authored-by: Gabriel Thomé <114624098+gabriel-thome-GVNG@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-31 12:28:29 +00:00
advaith
6e348ffd1d docs(MessageReplyOptions): remove duplicate stickers field (#8766)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-10-31 11:39:27 +00:00
DD
e7cbc1bf11 fix(BaseRedisBroker): proper import path to lua script (#8776)
* fix(BaseRedisBroker): proper import path to lua script

* chore: fix tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-27 19:47:00 +00:00
Almeida
53d8e87d7f fix: censor token in debug output (#8764)
Co-authored-by: Aura Román <kyradiscord@gmail.com>
2022-10-27 12:50:11 +00:00
Ryan Munro
fc10774461 feat: allow deletion of ephemeral messages (#8774)
* feat: allow deletion of ephemeral messages

* fix: restore missing key

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-27 11:22:12 +00:00
hackermon
68d5712dea fix: make ratelimit timeout require event loop to be active (#8779)
* fix issue with ratelimits not working correctly

related to #8757

The ``ref`` option doesn't require the Node.js event loop to remain active when waiting for the timeout causing the program to end if there isn't an active gateway connection.

* Update packages/rest/src/lib/handlers/SequentialHandler.ts

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

* Update packages/rest/src/lib/handlers/SequentialHandler.ts

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

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-10-23 10:45:02 +00:00
iCrawl
b2658ce504 chore: update eslint-config-neon 2022-10-20 03:39:38 +02:00
iCrawl
3cc50b9e95 chore: deps 2022-10-20 03:11:41 +02:00
iCrawl
c0e3629f64 ci: properly cache yarn deps 2022-10-20 02:52:59 +02:00
iCrawl
7083df7cef fix: styling and separation border for enums/interfaces 2022-10-17 23:40:34 +02:00
Synbulat Biishev
caeb1cbfdb feat(GuildChannelManager): add .addFollower() method (#8567)
* feat(GuildChannelManager): add `.addFollower()` method

* docs: dpply suggestions

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

* fix: resolve from `GuildChannelManager`

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

* types: correct channel type

* docs: update description

Co-authored-by: A. Román <kyradiscord@gmail.com>

* docs: update description

Co-authored-by: A. Román <kyradiscord@gmail.com>

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-16 16:04:30 +00:00
iCrawl
4f3c13628e fix: include brokers readme 2022-10-14 23:46:35 +02:00
iCrawl
94097d365a fix: default to main for stable selection 2022-10-14 23:38:08 +02:00
iCrawl
8af0b38b6c fix: fallback to main 2022-10-14 23:29:37 +02:00
Jiralite
66097e0cb0 chore: Bump discord-api-types (#8752) 2022-10-14 23:20:26 +02:00
DD
bf9aa1858d feat: @discordjs/brokers (#8548) 2022-10-13 22:20:36 +02:00
Jiralite
179392d6d7 docs: Remove unused imports (#8744) 2022-10-13 00:24:04 +02:00
Almeida
ea807e3eed chore: remove downlevel-dts dependency from template (#8743) 2022-10-12 18:47:51 +00:00
Jiralite
ef29b5e51f chore: Redirect voice examples to the new repository (#8737) 2022-10-12 12:27:02 +02:00
Almeida
cb3826ce6d refactor(Embed): use embedLength function from builders (#8735) 2022-10-12 11:39:28 +02:00
Almeida
d7a45a0567 chore: update api-extractor configurations (#8738) 2022-10-12 11:38:14 +02:00
Suneet Tipirneni
49b91315f7 fix: extract text from link tags for descriptions (#8739) 2022-10-12 11:37:07 +02:00
StarkRights
5ffabb119f fix: voice postbuild script (#8741) 2022-10-12 11:35:55 +02:00
iCrawl
eb46e3a5ad feat: add model description to open-graph 2022-10-11 16:12:16 +02:00
iCrawl
e8f63617a2 chore: deps 2022-10-11 16:01:45 +02:00
Suneet Tipirneni
b05be9ec08 feat(website): Add utility for resolving summaries for json items (#8734) 2022-10-11 16:01:32 +02:00
iCrawl
9d8179c6a7 fix: pin @types/node version
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/62629#issuecomment-1273892057
2022-10-11 14:32:38 +02:00
iCrawl
f92be4fb94 refactor: simplify path logic 2022-10-11 11:13:25 +02:00
iCrawl
c39faa94f6 chore: cleanup code 2022-10-11 09:36:36 +02:00
iCrawl
7b7cc6fde4 fix: localhost url for og:image 2022-10-11 08:54:07 +02:00
iCrawl
05fbe992e3 feat: og generation for models 2022-10-11 08:46:22 +02:00
iCrawl
698983b203 chore: deps 2022-10-11 04:09:02 +02:00
iCrawl
8b7ce2b61d feat: inline code highlight 2022-10-11 04:06:14 +02:00
iCrawl
e17323c15c fix: only include used fonts 2022-10-11 03:51:46 +02:00
iCrawl
f75f13d75b feat: add og image gen 2022-10-11 03:34:29 +02:00
Almeida
d587467a38 chore: use @link instead of markdown link in tsdocs (#8732)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 20:03:35 +00:00
iCrawl
5bfb61d5b8 ci: fix documentation workflow 2022-10-10 21:38:11 +02:00
iCrawl
c5d5840fef chore(discord.js): release discord.js@14.6.0 2022-10-10 19:20:16 +02:00
iCrawl
a4bf975f49 chore(ws): release @discordjs/ws@0.4.1 2022-10-10 19:19:21 +02:00
DD
c2b677759b fix(WebSocketShard): dispatch race condition (#8731) 2022-10-10 19:15:04 +02:00
MrMythicalYT
ac83ada306 types: fix events augmentation (#8681) 2022-10-10 19:14:49 +02:00
Almeida
02ffce8173 chore: make 'Note to developers' on version constant a regular comment (#8730)
chore: make 'Note to developers' a regular comment

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 14:42:03 +00:00
Almeida
caba122d20 fix: app paths (#8729) 2022-10-10 16:30:05 +02:00
RedGuy12
7b8966bca1 feat(Util): escape more markdown characters (#8701)
* feat(Util): escape more markdown characters

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* types(EscapeMarkdownOptions): update types

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* fix: lists bulleted with `*`

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* tests(escapeMarkdown): add tests

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 05:23:05 +00:00
iCrawl
3ed668e539 chore: move website and guide out of packages 2022-10-10 01:22:48 +02:00
NaeHyeok Jeong
0a9d57b011 chore: change token in readme to constant (#8688)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-09 21:27:46 +00:00
JPBM135
a31e605e09 docs(Utils): remove private from parseEmoji (#8718)
chore(Utils): remove `private` from `parseEmoji`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-09 21:19:53 +00:00
Cit The Dev
7556db243d docs: update UserContextMenuCommandInteraction documentation (#8717)
* Updated documentation for UserContextMenuCommandInteraction class

* Apply suggestions from code review

Co-authored-by: A. Román <kyradiscord@gmail.com>

Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-09 20:39:05 +00:00
Idris
4c2955a5de fix(ClientOptions): make ClientOptions#intents returns an IntentsBitField (#8617)
* fix(ClientOptions): make ClientOptions#intents returns an instance of IntentsBitField

* fix: client.options

* fix(types): Client#options

* fix(WebSocketShard): remove require for IntentsBitField

* fix(eslint): yarn format
2022-10-09 20:05:50 +00:00
iCrawl
5f72d8b645 fix: website fonts 2022-10-09 02:10:35 +02:00
iCrawl
a5d2ce2059 fix: alert component text selection 2022-10-09 01:23:54 +02:00
Ryan Munro
e548e6a10b fix: correctly construct a builder (#8727) 2022-10-09 01:07:12 +02:00
1Computer1
6fd331dd52 fix(Components): error with unknown components (#8724) 2022-10-09 01:06:37 +02:00
iCrawl
32297d4717 feat: prefetch pages for better navigation 2022-10-09 01:03:44 +02:00
Suneet Tipirneni
1b4f69b00a feat(guide): add github links for pages (#8725) 2022-10-09 00:58:28 +02:00
iCrawl
1ea7664aa3 fix: remove turbo experiment again 2022-10-09 00:19:53 +02:00
iCrawl
723c0b9b55 fix: 404 not resolving 2022-10-08 23:59:47 +02:00
iCrawl
f0dd41fc93 build: compress prod build 2022-10-08 23:27:07 +02:00
iCrawl
b6c0ab8a41 feat: implement turbo for navigation 2022-10-08 22:49:56 +02:00
iCrawl
6120971ef8 fix: height styling on toc 2022-10-08 22:34:45 +02:00
iCrawl
87ec3922a3 chore: update readmes 2022-10-08 17:55:01 +02:00
iCrawl
3f006cd33c build: fix cliff-jumper config 2022-10-08 17:32:07 +02:00
iCrawl
4bdd120e62 chore: deps 2022-10-08 16:55:34 +02:00
iCrawl
c0ea782dd4 chore(ws): release @discordjs/ws@0.4.0 2022-10-08 16:37:07 +02:00
iCrawl
ca21dc0f3b chore(voice): release @discordjs/voice@0.13.0 2022-10-08 16:36:59 +02:00
iCrawl
4a57b3947a chore(rest): release @discordjs/rest@1.3.0 2022-10-08 16:36:35 +02:00
iCrawl
41d1c2eefc chore(proxy): release @discordjs/proxy@1.2.0 2022-10-08 16:36:20 +02:00
iCrawl
60c70389a4 chore(collection): release @discordjs/collection@1.2.0 2022-10-08 16:35:58 +02:00
iCrawl
f06d12fd73 chore(builders): release @discordjs/builders@1.3.0 2022-10-08 16:34:30 +02:00
iCrawl
dc31b76465 ci: update workflow for tags 2022-10-08 16:33:37 +02:00
iCrawl
ba90f14f9b feat: auto-link headings 2022-10-08 15:44:00 +02:00
iCrawl
7b76b0b7e7 fix: proper root margin values for intersection observer 2022-10-08 14:31:26 +02:00
iCrawl
63939f8219 feat: automatic hash for anchors on scroll 2022-10-08 14:04:00 +02:00
Suneet Tipirneni
33ec49d5bf feat(guide): add outline for pages (#8722)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-10-08 05:15:02 +02:00
Jeroen Claassens
d923d0ab96 build: switch to esbuild-plugin-version-injector for injecting version strings (#8723) 2022-10-08 02:54:45 +02:00
iCrawl
62332c2720 chore: deps 2022-10-07 20:26:45 +02:00
Parbez
7af3c3b6f1 fix: ws package.json path (#8720) 2022-10-07 19:42:04 +02:00
iCrawl
5730866073 feat: alert & discord components 2022-10-07 17:49:03 +02:00
Parbez
9f68d73706 fix: cliff.toml styling (#8716) 2022-10-07 13:57:48 +02:00
Noel
0ac3e766bd feat: web-components (#8715) 2022-10-07 06:56:13 +02:00
iCrawl
76a7021452 chore: deps 2022-10-07 02:49:44 +02:00
iCrawl
103cb16be0 refactor: improve deprecation block 2022-10-07 02:45:04 +02:00
iCrawl
baa6c69835 refactor: improve tips/warnings 2022-10-07 02:44:28 +02:00
Suneet Tipirneni
f85022162d feat(scripts): Add script to create a @discordjs package (#8711) 2022-10-07 02:38:58 +02:00
iCrawl
35bfba0c50 fix: info and caution components 2022-10-07 01:14:49 +02:00
iCrawl
ecfe4e3f1c fix: index page 2022-10-07 00:33:41 +02:00
Noel
2628659747 feat: astro guide (#8714) 2022-10-06 23:53:35 +02:00
ckohen
01d75c8b8b fix(Client): don't auth for webhook fetches with token (#8709)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-06 19:43:00 +00:00
iCrawl
b64d657241 chore: removing building website from pre-commit 2022-10-06 12:36:26 +02:00
Almeida
7e51ea0ada chore(util): add missing cliff-jumper config file (#8707) 2022-10-06 12:11:19 +02:00
Almeida
aec44a0c93 refactor: rename Error to DiscordjsError internally (#8706)
* refactor: rename Error to DiscordjsError internally

* chore: remove globalThis usage

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-06 09:21:03 +00:00
iCrawl
e745b95677 chore: deps 2022-10-05 20:57:39 +02:00
Suneet Tipirneni
9effd82abe docs: fix AwaitMessageComponentOptions typedef (#8696)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-05 20:41:36 +02:00
SpaceEEC
628759bcff feat(GuildChannelManager): allow creating channels with a default auto archive duration (#8693) 2022-10-05 20:41:15 +02:00
muchnameless
a306219673 fix: re-export util (#8699) 2022-10-05 20:40:50 +02:00
Suneet Tipirneni
c0f7a1a89a types(Message): remove & this from #inGuild typeguard (#8704) 2022-10-05 20:40:28 +02:00
Julian
a7eab50ee3 fix(WebSocketShard): add ready data parameter to ready event (#8705) 2022-10-05 20:39:05 +02:00
Jiralite
ace974fc1f fix: Throw discord.js errors correctly (#8697)
fix: import errors correctly

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-05 16:16:07 +00:00
iCrawl
d9137c3658 chore: deps 2022-10-04 01:10:35 +02:00
iCrawl
b7fadb350a fix: sidebar menu styling 2022-10-04 01:02:37 +02:00
iCrawl
1f944b889f feat: allow search by tags 2022-10-04 00:47:15 +02:00
iCrawl
b187a18e9c feat: properly build search indicies 2022-10-04 00:46:15 +02:00
iCrawl
0b8651cf85 chore: remove building package docs with old docgen 2022-10-03 14:32:40 +02:00
iCrawl
bf92172d80 chore(util): release @discordjs/util@0.1.0 2022-10-03 14:08:03 +02:00
Suneet Tipirneni
b2ec865765 feat: add @discordjs/util (#8591)
* feat: add @discordjs/util

* fix: builders test

* refactor: make rest use lazy for ESM import

* chore: make requested changes

* Apply suggestions from code review

Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>

* chore: make requested changes and add tests

* chore: regen lockfile

* test: add type tests

* chore: push missing files

* chore: make requested changes

* chore: update CI stuff

* chore: fix lockfile

* chore: make requested changes

Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-02 18:00:31 +00:00
SpaceEEC
3f8656115b fix(SequentialHandler): throw http error with proper name and more useful message (#8694)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 14:50:18 +00:00
Almeida
883f6e9202 feat(ForumChannel): add defaultSortOrder (#8633) 2022-10-01 14:00:30 +00:00
Almeida
2ea2a85e63 types(ModalBuilder): fix constructor typings (#8690)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 13:53:56 +00:00
DD
f063625836 fix(proxyRequests): forward query parameters (#8691)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 13:46:52 +00:00
DD
6398e46043 chore(proxy-container): update README for proper request forwarding (#8692)
* chore(proxy-container): update README for proper request forwarding

* chore: remove unused import

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-01 13:40:24 +00:00
Almeida
d24dbf7d22 chore(deps): bump discord-api-types (#8685) 2022-10-01 13:30:19 +00:00
A. Román
3c231ae81a feat: add AbortSignal support (#8672)
* feat: add `AbortSignal` support

* fix: move the expect earlier

* fix: pass signal

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 18:44:03 +00:00
iCrawl
9f63eb977f chore(discord.js): release discord.js@14.5.0 2022-09-25 19:17:25 +02:00
iCrawl
c69f512450 chore(rest): release @discordjs/rest@1.2.0 2022-09-25 19:11:48 +02:00
iCrawl
4a07f9eaa1 chore: deps 2022-09-25 19:08:39 +02:00
Khafra
64cd53c4c2 feat(rest): use Agent with higher connect timeout (#8679)
* feat(rest): use Agent with higher connect timeout

* chore: lint

* chore: I'm an idiot

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 12:45:36 +00:00
MrMythicalYT
d79aa2d0d0 docs: fix duplicate typedefs (#8677)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 11:46:10 +00:00
Rodry
822b7f234a types(Collection): make fn return type unknown (#8676)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 11:40:58 +00:00
Jiralite
8ca407e089 docs(ForumChannel): Add @implements (#8678) 2022-09-25 13:27:56 +02:00
Jiralite
0126d9b810 fix(ThreadChannel): Add forum channel to parent (#8664)
fix(ThreadChannel): add forum channel to parent

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:51:11 +00:00
Jiralite
e9931229ae refactor(GuildBanManager): Add deprecation warning for deleteMessageDays (#8659)
refactor(GuildBanManager): add deprecation warning for `deleteMessageDays`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:45:30 +00:00
Jiralite
1486bc9336 types(GuildChannelManager): Handle forum channel overload (#8660)
types(GuildChannelManager): handle forum channel overload

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:40:19 +00:00
Almeida
16fcdc3687 fix(GuildChannelManager): allow creating webhooks on forums (#8661)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:34:19 +00:00
Jiralite
8622939229 fix(ForumChannel): Implement missing properties and methods (#8662)
* fix(ForumChannel): implement missing properties and methods

* refactor(ForumChannel): remove redundant default

* docs(ForumChannel): remove superfluous wording

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:28:42 +00:00
Jiralite
2487e3bf76 types(Caches): Allow GuildForumThreadManager and GuildTextThreadManager (#8665)
types: allow `GuildForumThreadManager` and `GuildTextThreadManager`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:14:43 +00:00
Maksi
578bc951bd fix: RepliableInteraction respect cached generic (#8667)
* fix: RepliableInteraction respect cached generic

* fix: prettier format

* Update packages/discord.js/typings/index.d.ts

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>
2022-09-24 14:09:24 +00:00
Jiralite
1244854e13 fix(ThreadChannel): Allow editing flags (#8671)
fix(ThreadChannel): allow editing flags

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 14:02:30 +00:00
Almeida
b1e190c4f0 fix: allow adding forums to channelTypes (#8658)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-24 13:37:41 +00:00
Jaworek
fc8ed816e6 fix(GuildChannelManager): typo in flags property name when editing (#8669)
* Update GuildChannelManager.js

* Update index.d.ts

* Update GuildChannelManager.js

* Update index.d.ts
2022-09-23 20:20:46 +00:00
Almeida
abb7226af3 feat(GuildChannelManager): allow editing flags (#8637)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-21 22:00:06 +00:00
iCrawl
30ceaf7e47 chore: deps 2022-09-21 18:46:51 +02:00
iCrawl
9b40a79b3e fix: focus-ring styles 2022-09-21 15:46:44 +02:00
iCrawl
0b12d6fa10 chore(discord.js): release discord.js 14.4.0 2022-09-21 14:09:39 +02:00
Jiralite
b106956308 feat(Widget): Allow forum channels (#8645) 2022-09-21 02:57:32 +02:00
Jiralite
6f1f465a77 feat(WelcomeChannel): Add forum channel as a type (#8643) 2022-09-21 02:57:18 +02:00
Almeida
eb98372dcd chore: fix proxy-container Dockerfile (#8648) 2022-09-21 02:56:47 +02:00
Jiralite
5048a3d17a feat: Allow forum channels in webhook update event (#8646)
feat: allow forum channels in webhook update event
2022-09-20 11:51:34 +00:00
Jiralite
f0497343f1 docs: Correctly overwrite setRTCRegion method (#8642)
docs: correctly overwrite `setRTCRegion` method

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 21:07:58 +00:00
Jiralite
f6f15d8e87 fix: Correct applied tags type (#8641)
* fix: correct applied tags type

* types: this is never a private thread channel

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 21:02:36 +00:00
Jiralite
14bbc9150a types: Narrow channel type in thread managers (#8640)
types: narrow channel type in thread managers

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 20:00:59 +00:00
Jiralite
a7f816eeb7 fix(ThreadChannel): Make fetchStarterMessage() work in forum posts (#8638)
fix(ThreadChannel): make `fetchStarterMessage()` work in forum posts

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 19:55:33 +00:00
Jiralite
802b2394b0 docs(GuildTextThreadManager): Document correct @extend (#8639)
docs(GuildTextThreadManager): document correct `@extend`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 19:50:18 +00:00
iCrawl
c446a84570 build: trigger rebuild 2022-09-19 15:40:57 +02:00
iCrawl
9cf0a4904b chore: patch all versions of tsdoc-config 2022-09-19 15:35:29 +02:00
iCrawl
25dc146247 build: revert to using patch 2022-09-19 15:13:22 +02:00
iCrawl
a2b08aaf3b build: different import for schema 2022-09-19 14:53:57 +02:00
iCrawl
eba9cc6038 chore: deps 2022-09-19 14:41:43 +02:00
Almeida
145eb2fc5d fix: update messageCount/totalMessageSent on message events (#8635)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-19 00:38:23 +00:00
Almeida
8444576f45 docs(builders/components): document constructors (#8636) 2022-09-19 02:32:28 +02:00
iCrawl
6d43e26676 fix: border color in dark mode 2022-09-18 20:27:04 +02:00
iCrawl
2fc3d86f56 feat: searchbar 2022-09-18 20:16:50 +02:00
Suneet Tipirneni
8a8d519c9c feat: add support for guild forums (#7791)
* feat: add support for guild forums

* feat(webhook): add support for creating forum channel posts

* fix: duplicated docs

* feat: add support for message counts

* feat: add support for latest upstream changes

* fix: serialize forum channels

* types: fix channel unions

* types: fix tests

* types: fix tests (again)

* types: fix tests (again (again))

* chore: make requested changes

* chore: fix bugs and make requested changes

* types: use correct type for guild forum start messages

* chore: remove console.log

* chore: make requested changes

* chore: make requested changes

* chore: fix docs

* Update packages/discord.js/src/managers/GuildForumThreadManager.js

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

* chore: update types

* chore: make requested changes

* chore: Apply suggestions

Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>

* fix: import `ErrorCodes`

* fix: remove defunct code

* refactor: be consistent with channel class names

* feat(GuildChannel): add flags

* fix: rename file

* refactor: channel flags are everywhere!

* fix: import flags correctly

* chore(ThreadChannel): update message count string

* docs(Channels): correct `@param` type

* docs(Channels): ignore transformGuildDefaultReaction

* refactor: emoji object in tags

* chore: renaming consistency

* fix: document default reaction emojis in patching

* fix(GuildChannelManager): document `defaultThreadRateLimitPerUser`

* chore: semicolon

* docs(ErrorCodes): document `GuildForumMessageRequired`

* refactor: transform default reactions

* docs(APITypes): Add `ChannelFlags`

* fix: convert tags properly

* fix: pass an array of snowflakes

* refactor: handle flags better

* fix(ThreadChannel): receive tags

* fix(PartialGroupDMChannel): nullify `flags`

Apparently did not do this earlier.

* chore: misc sorting

* refactor: nullify emoji on tags if not present

* refactor(ForumChannel): modify returns

* types: protect the thread manager!

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

* chore: update `ChannelType` usage

* Update index.d.ts

* docs: Update default reaction emoji property names

Co-authored-by: Almeida <almeidx@pm.me>

* fix: only `name` is required when editing tags

- discord/discord-api-docs#5458

* types: add tests for `channel.flags`

* fix: allow unsetting the default reaction emoji

* refactor: remove v13 remnants

* docs: add missing closing tag

* feat: add `rateLimitPerUser`

* feat: add missing properties for create guild channel

- discord/discord-api-docs#5474

* refactor(GuildForumThreadManager): refactor message payload

* fix: handle magical `null` case

Co-authored-by: A. Román <kyradiscord@gmail.com>

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Jaworek <jaworekwiadomosci@gmail.com>
Co-authored-by: Jonathan Rubenstein <jrubcop@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: A. Román <kyradiscord@gmail.com>
2022-09-18 14:23:44 +00:00
Almeida
669c3cd256 refactor: replace usage of deprecated ChannelTypes (#8625)
refactor: use new non-deprecated `ChannelType`s

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-17 13:56:19 +00:00
Suneet Tipirneni
678ceaa014 feat(website): use dropdowns for overloads (#8630)
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-09-17 14:09:54 +02:00
iCrawl
0785353efe fix: footer hiding properly 2022-09-17 00:31:28 +02:00
iCrawl
8323926304 fix: overflow in cmdk menu 2022-09-17 00:30:15 +02:00
iCrawl
bccc2c8e89 refactor: light theme for cmdk 2022-09-16 23:42:01 +02:00
iCrawl
1d72663e92 fix: allow usage of ctrl key additionally to metakey 2022-09-16 23:27:44 +02:00
iCrawl
d0a2a6227d fix: prevent default for cmd+k 2022-09-16 23:17:05 +02:00
iCrawl
735e0bf52e feat: search 2022-09-16 23:04:05 +02:00
Almeida
1c5b78fd21 fix(SlashCommandBuilder): missing methods in subcommand builder (#8583) 2022-09-15 20:19:13 +02:00
Almeida
053da5bc91 types(interactions): pass Cached type to return type of methods (#8619) 2022-09-15 20:18:48 +02:00
RedGuy12
fc9653f5ae docs: fix regexps incorrectly being called global (#8624) 2022-09-15 20:15:01 +02:00
Almeida
22ac6b4660 docs: update misleading Client#guildMemberAvailable event description (#8626) 2022-09-15 20:13:55 +02:00
iCrawl
d14d47b62f chore: dep cleanup 2022-09-12 18:46:15 +02:00
Jiralite
a9f003ac9b types: Ensure events possess Client<true> (#8612)
types: ensure events possess `Client<true>`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-11 18:36:24 +00:00
RedGuy12
1d4cdee321 types(GuildChannelManager): correct fetch return type (#8549)
* types(GuildChannelManager): correct `fetch` return type

* fix(ci): fix the types tests

* fix: fix the docs

* Update packages/discord.js/src/managers/GuildChannelManager.js

Co-authored-by: Almeida <almeidx@pm.me>

* types: allow channels in the collection to be null

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* style: run prettier

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* test: fix types again

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

* style: run prettier

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-11 18:29:28 +00:00
Jiralite
8e1afaebdb refactor: Split message send/edit types/documentation (#8590)
* refactor: split message send/edit types

* refactor: move `MessageEditOptions`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-11 18:22:53 +00:00
advaith
32523325c6 docs(Options): update DefaultMakeCacheSettings (#8585)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-11 18:16:34 +00:00
iCrawl
7a9e52e63a fix: tiny screen cmdk size 2022-09-09 21:55:35 +02:00
iCrawl
d11edc6397 fix: build script for website 2022-09-09 00:23:42 +02:00
iCrawl
96304d7cc8 feat: command menu 2022-09-09 00:08:59 +02:00
iCrawl
f9e9bfdedc chore: deps 2022-09-09 00:07:56 +02:00
iCrawl
ce1f5c8d47 feat: redirect to old docs for main documentation 2022-09-08 17:05:13 +02:00
advaith
03fb5b0a2f feat(GuildBanManager#create): add deleteMessageSeconds (#8326)
* feat(GuildBanManager#create): add `deleteMessageSeconds`

* Apply suggestions from code review

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

* chore: remove typeof and return undefined if neither are set

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-08 13:15:01 +00:00
RedGuy12
ce991dd1d8 test: rename incorrect test (#8596) 2022-09-08 15:08:28 +02:00
Parbez
dbca93098c chore: remove unused eslint disable comments (#8595) 2022-09-08 15:08:04 +02:00
A. Román
dd5a08944c docs: change name (#8604) 2022-09-08 01:46:41 +02:00
iCrawl
8e98ba94d2 fix: properly center badge text 2022-09-07 22:57:35 +02:00
iCrawl
74dc8c10d5 fix: hide menu on click 2022-09-07 19:19:58 +02:00
iCrawl
8d07ea9a62 fix: dark/light theme fixes 2022-09-07 18:39:02 +02:00
iCrawl
d8e774138d fix: accessibility improvements 2022-09-07 11:29:58 +02:00
Maksi
55c3ee20ae feat: add typeguard to BaseInteraction#isRepliable (#8565)
* feat: add typeguard to BaseInteraction#isRepliable

* fix: redefine RepliableInteraaction

...to exclude impossible interactions rather than specify possible ones

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

* fix: remove InteractionResponseFields

* fix: replace InteractionResponseFields with RepliableInteraction in index test

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-06 17:56:21 +00:00
Noel
c3341570d9 refactor: website components (#8600) 2022-09-06 19:48:33 +02:00
Almeida
f3ce4a75d0 docs: use remarks instead of Note in descriptions (#8597) 2022-09-05 18:14:19 +02:00
iCrawl
4ffdada4f7 chore: deps 2022-09-04 19:33:57 +02:00
Almeida
8b3d006118 feat(Integration): add scopes (#8483) 2022-09-04 08:11:27 +00:00
Almeida
d08a57cadd feat: add chatInputApplicationCommandMention formatter (#8546)
feat: add `chatInputApplicationCommandMention()` formatter

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-03 07:17:06 +00:00
iCrawl
0dc68445a1 refactor: open graph fixes 2022-09-03 05:02:16 +02:00
iCrawl
a7ad7e75ce feat: open graph 2022-09-03 04:48:33 +02:00
Suneet Tipirneni
f79ccb4971 chore(website): bump api-extractor-model (#8584) 2022-09-03 01:14:00 +02:00
iCrawl
6f2b223c8b refactor: extract create model function 2022-09-03 01:01:40 +02:00
iCrawl
a4777aa9b0 feat: add naive client-based search 2022-09-03 00:42:34 +02:00
iCrawl
f072d3d916 feat: redirect to latest version, otherwise click select version button 2022-09-02 22:42:12 +02:00
iCrawl
0238588067 build: fix website build 2022-09-02 22:07:19 +02:00
iCrawl
1d460e0434 chore: deps 2022-09-02 21:48:05 +02:00
RedGuy12
b9c62ac0f0 types(ThreadChannel): fetchStarterMessage must return a Message<true> (#8560)
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>

Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-02 18:44:39 +00:00
iCrawl
df46ab8061 build: tsup for better cjs / esm support 2022-09-02 18:08:16 +02:00
A. Román
b7eb96d456 types(interactions): fix {Slash,ContextMenu}CommandBuilder#toJSON (#8568) 2022-09-02 17:31:25 +02:00
D Trombett
f77612a55e types(webhook): avatar can be null (#8541) 2022-09-02 15:30:06 +00:00
Suneet Tipirneni
9b4116b659 chore(website): put seperators between properties (#8576) 2022-09-02 17:20:57 +02:00
Almeida
8a91d7c256 fix: docgen (#8582) 2022-09-01 22:04:58 +02:00
iCrawl
3b7ba4062e chore: fix leftover eslint exceptions 2022-09-01 21:26:09 +02:00
Suneet Tipirneni
edadb9fe5d refactor: use eslint-config-neon for packages. (#8579)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-09-01 20:50:16 +02:00
Parbez
4bdb0593ae chore: bump typescript-eslint to support ts 4.8 (#8573) 2022-08-30 22:23:00 +02:00
iCrawl
fd97da9b6c chore: missing config files 2022-08-29 21:48:12 +02:00
Suneet Tipirneni
d5dcddd350 feat: add util package for generating search indices (#8571) 2022-08-29 21:41:51 +02:00
Suneet Tipirneni
40324574eb docs: remove xml tag from collection#find (#8550) 2022-08-29 18:05:30 +02:00
A. Román
1398af66f0 chore(github): resolved typos in issue templates (#8564) 2022-08-29 18:04:37 +02:00
iCrawl
682e0e1802 fix: don't prefetch as links enter viewport 2022-08-26 12:00:25 +02:00
iCrawl
13baf75cae chore: return error 2022-08-24 06:09:39 +02:00
iCrawl
1d6b31b78d fix: revalidate on notFound 2022-08-24 05:42:43 +02:00
iCrawl
5f093dde24 chore: log errors as errors 2022-08-24 05:36:10 +02:00
iCrawl
b58e6a65ad fix: don't throw on not serializable kind 2022-08-24 05:23:03 +02:00
iCrawl
204f4dd7c4 chore: some logging 2022-08-23 22:37:19 +02:00
iCrawl
249ba0a9a6 refactor: contrast & colors 2022-08-23 21:31:38 +02:00
iCrawl
92933c2b61 refactor: memoize everything 2022-08-23 19:39:31 +02:00
iCrawl
abd3fc8ceb fix: properly 404 and revalidate 2022-08-23 18:53:38 +02:00
iCrawl
84059b6b25 fix: affix position when ToC is visible 2022-08-23 17:32:03 +02:00
iCrawl
6da405668f chore: just in case 2022-08-23 17:30:26 +02:00
iCrawl
58d2a1e6d7 chore: deps 2022-08-23 15:17:17 +02:00
iCrawl
7b5c688844 fix: mobile centering 2022-08-23 14:21:48 +02:00
iCrawl
28bc4f42c6 feat: light theme code blocks 2022-08-23 14:00:02 +02:00
iCrawl
5b4672bad3 refactor: css 2022-08-23 13:21:32 +02:00
iCrawl
a57b9ba5c4 refactor: mobile layout for badges 2022-08-23 12:54:40 +02:00
iCrawl
32da9b3868 fix: footer and sidebar mobile spacing 2022-08-23 12:06:18 +02:00
iCrawl
70806b401e style: type import 2022-08-23 12:01:48 +02:00
iCrawl
0674820723 style: spacing 2022-08-23 11:20:08 +02:00
iCrawl
2d5bce274c fix: footer on mobile 2022-08-23 11:13:39 +02:00
iCrawl
331dedcb9d refactor: front page 2022-08-23 10:57:34 +02:00
iCrawl
103e1bd843 feat: add footer links 2022-08-23 10:11:07 +02:00
iCrawl
ffafde0b6b refactor: make dark theme the default 2022-08-23 09:36:19 +02:00
iCrawl
28422eea58 fix: spacing of footer and affix 2022-08-23 09:15:33 +02:00
iCrawl
c826ad3ade feat: markdown syntax highlighting 2022-08-23 08:48:44 +02:00
iCrawl
17559becef refactor: change radius 2022-08-23 08:18:36 +02:00
iCrawl
b31a23b37c build: "no default export" 2022-08-23 08:01:09 +02:00
iCrawl
8e4f77a63b build: use module 2022-08-23 07:55:41 +02:00
iCrawl
b16ab8c69f fix: check if router is ready before using its path 2022-08-23 07:07:22 +02:00
iCrawl
cf8570c19c style: spacing on mobile 2022-08-23 07:05:48 +02:00
iCrawl
f0ab393411 fix: use correct icon on version select 2022-08-23 05:22:18 +02:00
iCrawl
11e02f1e5d refactor: include item kind into url 2022-08-23 05:13:53 +02:00
iCrawl
206523587a refactor: split out package constant 2022-08-23 04:20:41 +02:00
iCrawl
ac3bc6a2db style: spacing 2022-08-23 04:11:12 +02:00
iCrawl
af295acedc fix: wrong active item after anchor select 2022-08-23 03:59:53 +02:00
iCrawl
caa5c0332f feat: add anchor icon 2022-08-23 03:06:21 +02:00
iCrawl
434f696397 refactor: reset state and code cleanup 2022-08-23 02:38:53 +02:00
iCrawl
6062d361fb feat: more fallback cases 2022-08-23 02:13:10 +02:00
iCrawl
2ecb862e76 feat: use fallback with loading 2022-08-23 01:43:10 +02:00
iCrawl
360936140b fix: don't persist state between pages 2022-08-23 01:26:57 +02:00
iCrawl
0b56184ba7 fix: github link and light theme hover nav link 2022-08-23 01:21:28 +02:00
iCrawl
a55545850a refactor: better spacing 2022-08-23 01:02:46 +02:00
iCrawl
f16b11a91d feat: active navigation and back button 2022-08-23 00:44:09 +02:00
iCrawl
0fb2694871 refactor: switch to ssr for unbuilt pages 2022-08-23 00:13:04 +02:00
iCrawl
ee030003ec fix: markdown images and links 2022-08-22 23:58:49 +02:00
iCrawl
29c51be1f4 feat: custom 404 2022-08-22 23:58:33 +02:00
iCrawl
43a78be70b fix: return 404 if a fetch error or no data is returned 2022-08-22 23:29:23 +02:00
iCrawl
92c0c60519 feat: version picker 2022-08-22 23:08:23 +02:00
iCrawl
ba3e0ed348 fix: footer / sidebar / deprecation alert 2022-08-22 22:15:50 +02:00
iCrawl
f7ce9f8533 feat: footer 2022-08-22 21:52:17 +02:00
iCrawl
00990c93ae chore: missing vercel banner 2022-08-22 21:06:34 +02:00
iCrawl
c076b0d8cb fix: don't redirect to the first item 2022-08-22 21:02:15 +02:00
iCrawl
d297fb0b69 feat: readme if no member is selected 2022-08-22 20:51:43 +02:00
iCrawl
24c128d649 feat: experiment with spotlight 2022-08-22 19:44:56 +02:00
iCrawl
ec7c6e3d3e fix: selecting packages on the sidebar 2022-08-22 18:38:07 +02:00
iCrawl
6dfb9bbc48 feat: generate all tags 2022-08-22 18:30:46 +02:00
Suneet Tipirneni
4644e45e85 fix(website): use inter font for titles (#8542)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-22 18:29:26 +02:00
iCrawl
1e001601c8 refactor: change url scheme 2022-08-22 16:50:43 +02:00
iCrawl
1aec243b1d feat: packages route 2022-08-22 16:01:42 +02:00
iCrawl
191951ac28 feat: add ToC to interfaces 2022-08-22 15:38:47 +02:00
iCrawl
4fb4492b17 refactor: icons and head 2022-08-22 15:34:21 +02:00
iCrawl
abb968de81 feat: favicon 2022-08-22 14:57:51 +02:00
iCrawl
d9e53093f5 fix: properly check for properties and methods 2022-08-22 14:32:59 +02:00
iCrawl
e5678f4656 feat: list properties and method in table of content 2022-08-22 14:30:15 +02:00
iCrawl
9f18036078 fix: hydration error 2022-08-22 14:29:31 +02:00
iCrawl
474eae0afc style: change how optionals are displayed 2022-08-22 14:19:02 +02:00
iCrawl
caeb66e150 fix: overflowing content 2022-08-22 14:12:53 +02:00
iCrawl
7623fc552e ci: don't double check inputs 2022-08-22 12:11:45 +02:00
iCrawl
230c43e97d build: fix downlevel-dts 2022-08-22 11:29:57 +02:00
iCrawl
4e3fa586b5 chore(discord.js): release discord.js@14.3.0 2022-08-22 10:56:30 +02:00
Jiralite
6bb1474d20 types: Inference of guild in MessageManager (#8538)
* types: better inference of message manager

* types: alter helper methods

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-22 08:31:02 +00:00
iCrawl
27bbc8fe68 chore(builders): release @discordjs/builders@1.2.0 2022-08-22 10:10:19 +02:00
iCrawl
e2cde5daa0 chore(collection): release @discordjs/collection@1.1.0 2022-08-22 10:08:38 +02:00
iCrawl
0960457108 chore: update proxy and rest in proxy-container 2022-08-22 10:07:22 +02:00
iCrawl
cd6b365b17 chore: changelog 2022-08-22 10:06:49 +02:00
iCrawl
19e1f5d0ca chore(proxy): release @discordjs/proxy@1.1.0 2022-08-22 10:04:03 +02:00
iCrawl
3621e5efbd chore(rest): release @discordjs/rest@1.1.0 2022-08-22 10:01:34 +02:00
iCrawl
d2f5b5b539 chore(ws): release @discordjs/ws@0.3.0 2022-08-22 09:57:26 +02:00
iCrawl
9ed11a4c19 chore: deps 2022-08-22 09:56:42 +02:00
Suneet Tipirneni
e42fd16369 feat(website): Show constructor information (#8540) 2022-08-22 09:45:53 +02:00
Jiralite
dd44e8b6ec fix(proxyRequests): Typo in error message (#8537)
fix(proxyRequests): typo in error message

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-21 20:39:40 +00:00
Synbulat Biishev
3bef9018c0 fix(GuildMemberManager): add() method throws an error (#8539)
* fix(GuildMemberManager): `add()` method throws an error

* chore: update comment
2022-08-21 20:32:56 +00:00
Jiralite
23a0b6ccf2 fix(Guild): Widget channel types and fixes (#8530)
fix: various widget fixes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-21 09:28:31 +00:00
Jiralite
b3f7c32f7f types: Allow choice's value type to be strictly inferred (#8529)
* types: stricter types for choices in options

* test: add choice tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 20:29:16 +00:00
Jiralite
0dba8adbd2 types(GuildAuditLogs): Allow fetching to return all possible values (#8522)
types: allow everything to be returned upon fetching

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 19:03:36 +00:00
Jiralite
2b8074dd12 refactor(GuildAuditLogsEntry): Remove guild from application command permission update extra (#8520)
refactor(GuildAuditLogsEntry): remove guild extra

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 18:51:39 +00:00
InkoHX
16bbc8aa20 types: Correct EventEmitter.on (static) return type (#8524)
types: Correct EventEmitter.on (static) return type

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 18:45:56 +00:00
Jiralite
7a3d18dd6d types(GuildAuditLogs): Remove static Entry (#8521)
types(GuildAuditLogs): remove static `Entry`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-20 18:34:32 +00:00
Jiralite
4882b17a77 types: Disallow some channel types from webhook creation (#8531)
types: disallow some channel types from webhook creation
2022-08-20 18:26:33 +00:00
Suneet Tipirneni
8028813825 feat(website): render @defaultValue blocks (#8527)
feat(website): render @defaultValue blocks
2022-08-19 18:24:55 +02:00
Suneet Tipirneni
47f2990b89 feat(website): show inherited members (#8526)
* feat(website): show inherited members

* fix: use passHref
2022-08-19 18:22:22 +02:00
Suneet Tipirneni
e475b63f25 feat(website): show descriptions for @typeParam blocks (#8523) 2022-08-19 10:55:43 +02:00
iCrawl
673262d38c feat: deprecation badges 2022-08-18 18:47:44 +02:00
Suneet Tipirneni
7f415a2502 feat(website): show parameter descriptions (#8519)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-18 18:38:27 +02:00
DD
cda3f005b1 feat(GuildMemberManager): addRole and removeRole (#8510)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-18 10:58:35 +02:00
Synbulat Biishev
f9c25ddcfe feat: deprecate ActionRow.from() (#8504)
* feat: deprecate `ActionRow.from()`

* feat: deprecate `ActionRow.from()`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-18 07:06:01 +00:00
iCrawl
74740260a7 ci: fix if statement, again 2022-08-17 23:51:07 +02:00
iCrawl
1008e3d4a7 ci: fix if check 2022-08-17 23:46:22 +02:00
iCrawl
17ab0e652c refactor: inline table of contents 2022-08-17 23:21:23 +02:00
Noel
872ce801a0 revert: "refactor(website): use mantine code blocks" (#8514) 2022-08-17 23:04:47 +02:00
Suneet Tipirneni
0bf3df30da refactor(website): use mantine code blocks (#8512) 2022-08-17 22:38:11 +02:00
iCrawl
20680efbc9 feat: more visibly annotate optionals 2022-08-17 22:16:22 +02:00
Jiralite
7701331b1c ci: Remove management of chore label (#8508)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-17 20:12:54 +00:00
Suneet Tipirneni
0be85fd101 feat(website): render @deprecated and @remarks blocks (#8511) 2022-08-17 21:51:29 +02:00
iCrawl
e147c5bd64 fix: codelisting 2022-08-17 21:24:38 +02:00
iCrawl
2f1ec7401c feat: table of contents / method visibility / property modifiers 2022-08-17 21:12:09 +02:00
Suneet Tipirneni
0f83402985 refactor(website): adjust typography (#8503) 2022-08-17 10:17:09 +02:00
Parbez
d97cd936fd chore: bump vitest and add @vitest/coverage-c8 (#8507) 2022-08-17 09:44:21 +02:00
Jiralite
812f7f1ea8 types: Implement max/min values for autocomplete (#8498)
* types: implement max/min values for autocomplete

* refactor: deduplicate options

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 20:37:08 +00:00
Jiralite
7d2507279c docs(GuildAuditLogsEntry): Correct action wording (#8499)
docs(GuildAuditLogsEntry): fix `action` wording

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 20:30:07 +00:00
Rodry
c31a5cfcc8 types(ModalMessageModalSubmitInteraction): channelId is not nullable (#8496)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:38:30 +00:00
DD
acdafe60c7 fix(WebSocketShard#destroy): wait for close and cleanup listeners (#8479)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:33:00 +00:00
DD
4fd42528fe fix(WebSocketManager#connect): check if we have enough sessions (#8481)
* fix(WebSocketManager#connect): check if we have enough sessions

* fix: more useful error message

* fix: tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-16 15:28:01 +00:00
ZyX
ebaf158006 types: change type of ApplicationCommandSubCommand.options (#8476)
* types: change type of ApplicationCommandSubCommand.options

* types: change type of ApplicationCommandSubCommand.options

* Update packages/discord.js/typings/index.d.ts

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

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-08-16 14:39:16 +00:00
Suneet Tipirneni
7116647947 feat(website): render tsdoc examples (#8494) 2022-08-16 16:33:49 +02:00
iCrawl
c99b808882 ci: fix workflow 2022-08-16 16:24:07 +02:00
iCrawl
a1dddd6b2c build: only build web on vercel 2022-08-16 16:07:08 +02:00
iCrawl
b3db9eef32 build: force a docs rebuild 2022-08-16 15:51:51 +02:00
iCrawl
501945215b ci: use concurrency 2022-08-16 11:00:17 +02:00
iCrawl
e82b2e49f5 fix: use correct env file 2022-08-15 19:17:41 +02:00
iCrawl
5f42b5af30 feat: fetch from local when developing or CI build 2022-08-15 19:13:01 +02:00
iCrawl
35e79b389d fix: correctly handle overflowing content 2022-08-15 18:35:34 +02:00
iCrawl
5dc7946df2 fix: properly render critical styles on the server 2022-08-15 18:23:10 +02:00
iCrawl
1e00f5789e chore: enable kodiak for auto merges 2022-08-15 16:56:30 +02:00
iCrawl
85cb0f25c7 build: run build with concurrency but everything else parallel 2022-08-15 16:16:12 +02:00
iCrawl
3cc893a282 build: enable parallel building for turbo 2022-08-15 16:12:45 +02:00
Marcus Otterström
fc99bf431a Specify time unit in awaitModalSubmit (#8484) 2022-08-15 16:07:03 +02:00
Noel
4ab1d09997 refactor: docs design (#8487) 2022-08-15 14:48:00 +02:00
iCrawl
d09ef1e425 build: switch back to turbo for speedz 2022-08-15 14:19:17 +02:00
iCrawl
d56590a11d chore: use external collection for docgen 2022-08-15 13:50:41 +02:00
iCrawl
c052f56f3e ci: fix typechecking in ci 2022-08-15 00:42:33 +02:00
iCrawl
cb856860b7 ci: install dev deps everywhere 2022-08-14 21:30:55 +02:00
iCrawl
4cf265c7c6 ci: exclude shared match 2022-08-14 21:21:17 +02:00
iCrawl
3ec7ef07a0 ci: correctly reference job 2022-08-14 21:17:12 +02:00
iCrawl
90e7aea443 ci: check for shared additionally to packages 2022-08-14 21:04:51 +02:00
iCrawl
1211c7fc10 ci: fix dependency 2022-08-14 20:12:58 +02:00
iCrawl
84a4b1f58a ci: only test run affected packages 2022-08-14 20:12:02 +02:00
iCrawl
193b252672 docs: fence examples in codeblocks 2022-08-14 19:25:25 +02:00
DD
bc06cc638d feat(WebSocketShard): support new resume url (#8480) 2022-08-14 12:01:35 +02:00
iCrawl
d08da8a212 refactor: properly handling spacing 2022-08-13 20:42:03 +02:00
iCrawl
5360099e5f build: don't build website on ci, let vercel handle it on changes 2022-08-13 20:14:28 +02:00
Suneet Tipirneni
fd4844ddb9 feat(website): add support for function overloads (#8474)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-13 20:14:23 +02:00
iCrawl
8e69efde04 feat(website): breadcrumbs layout 2022-08-12 17:04:12 +02:00
iCrawl
2447165c82 fix(website): accessibility 2022-08-12 17:03:04 +02:00
Jiralite
c97977a3e8 fix(Embed): Reference video in video (#8473) 2022-08-12 05:09:44 +02:00
iCrawl
7666a6c341 chore: update changelog 2022-08-10 20:56:22 +02:00
iCrawl
9d8966fe24 chore(discord.js): release discord.js@14.2.0 2022-08-10 20:50:57 +02:00
iCrawl
4d128acac5 chore: deps 2022-08-10 20:37:25 +02:00
iCrawl
831d6506cb chore: update changelog 2022-08-10 20:26:45 +02:00
RedGuy12
c5b96a185c types(Message): correct bulkDelete return type (#8465)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-10 20:25:12 +02:00
Jiralite
afa27b15c5 fix(ThreadChannel): Handle possibly null parent (#8466) 2022-08-10 20:16:57 +02:00
iCrawl
4d7283933d chore: update changelog 2022-08-10 19:44:23 +02:00
Jan Parisek
452e94fd3e types: fix missing types for mentionable options (#8443)
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-08-10 18:33:52 +02:00
Jiralite
6c6fe74dd8 fix: Remove DM channels from Client#messageDeleteBulk's types (#8460) 2022-08-10 18:29:46 +02:00
A. Román
0e2a09571c fix(Transformers): do not transform Date objects (#8463) 2022-08-10 18:28:35 +02:00
Ryan Munro
0fab869e51 fix(ModalSubmitInteraction): allow deferUpdate (#8455) 2022-08-10 18:25:56 +02:00
advaith
64a4041a05 docs: change registration example to use global commands (#8454) 2022-08-10 18:25:31 +02:00
Jan Parisek
38275fc53d types(ApplicationCommandOption): add ApplicationCommandBooleanOption (#8434) 2022-08-10 18:24:50 +02:00
n1ck_pro
aac8acc22b fix(Guild): unable to fetch templates (#8420) 2022-08-08 11:11:10 +02:00
Ryan Munro
6ef4754d40 docs(Colors): provide enum descriptions (#8437) 2022-08-08 11:10:43 +02:00
Almeida
b8a31360a2 fix(MessageMentions): infinite loop in parsedUsers getter (#8430) 2022-08-08 11:10:32 +02:00
RedGuy12
5b053cf82e docs(AttachmentBuilder): fix #8407 (#8421)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-08-08 11:06:11 +02:00
Synbulat Biishev
e72b986939 fix(DataResolver): make Buffer from string (#8416) 2022-08-08 11:05:56 +02:00
Jiralite
3a96ce7970 feat(Guild): Add max_video_channel_users (#8423) 2022-08-08 11:05:40 +02:00
SpaceEEC
359f688555 fix(WebSocketShard): always reconnect on disconnected with 1000 (#8405) 2022-08-01 13:24:25 +02:00
SpaceEEC
3161e1a1ac fix(WebSocketShard): emit errors directly instead of objects (#8406) 2022-08-01 13:24:09 +02:00
iCrawl
4d8361c711 build: fix building actions 2022-07-30 22:02:02 +02:00
iCrawl
d6e4d149fd chore(discord.js): release discord.js@14.1.2 2022-07-30 21:00:09 +02:00
DD
480c85c9c3 fix(errors): error codes (#8398) 2022-07-30 20:49:59 +02:00
iCrawl
b45b99f92b chore(ws): release @discordjs/ws@0.2.0 2022-07-30 20:42:46 +02:00
DD
5137bfc17d fix(WebSocketShard): account code 1000 with no prior indication (#8399) 2022-07-30 20:37:46 +02:00
Jiralite
fca3dada2a docs(Embed): Ensure height and width are numbers (#8396) 2022-07-30 11:39:15 +02:00
Parbez
d070de6da7 chore: fix file path (#8391)
* chore: fix file path

* chore: emit only mjs
2022-07-29 18:43:57 +02:00
iCrawl
a3183cfad4 chore(discord.js): release discord.js@14.1.1 2022-07-29 13:47:21 +02:00
iCrawl
aba307341d chore(builders): release @discordjs/builders@1.1.0 2022-07-29 13:42:55 +02:00
Parbez
c479d39a6b chore: build only actions (#8383) 2022-07-29 11:19:54 +02:00
Parbez
52c2818b25 feat(website): add implements for class (#8388)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-07-29 11:19:32 +02:00
iCrawl
d03cf6176c chore(discord.js): release discord.js@14.1.0 2022-07-29 11:04:08 +02:00
iCrawl
11e77f7f86 chore: deps 2022-07-29 11:00:45 +02:00
iCrawl
2b1e88b5fa chore: update changelog 2022-07-29 10:59:35 +02:00
Synbulat Biishev
e5bfe2c7c2 chore: reexport rest (#8372) 2022-07-29 10:47:30 +02:00
Jiralite
a7deb8f898 feat: Add channel & message URL formatters (#8371) 2022-07-29 10:47:23 +02:00
Almeida
b4e2c0c4d5 fix(MessageMentions): ignoreRepliedUser option in has() (#8202) 2022-07-29 10:47:05 +02:00
Suneet Tipirneni
33113614e0 feat(website): parse tsdoc comments (#8386) 2022-07-29 10:46:17 +02:00
Suneet Tipirneni
26556390a3 fix: use proper format for @link text (#8384)
fix(collection): use proper format for link text
2022-07-28 20:24:07 +02:00
Parbez
5494791313 docs: use link tags (#8382) 2022-07-28 19:18:42 +02:00
Parbez
c258bdf083 chore: cleanup tsup configs (#8381) 2022-07-28 18:57:57 +02:00
Parbez
ff5dd1fcb4 docs: hide sections with no members (#8380) 2022-07-28 17:55:46 +02:00
iCrawl
a38c58dbd0 feat: tertiary sidebar 2022-07-28 17:46:41 +02:00
Suneet Tipirneni
ec43c184fe feat(website): add icons for sections (#8377)
* feat(website): add icons for sections

* chore: make requested changes

* fix: add icon for function parameters
2022-07-28 16:26:06 +02:00
iCrawl
c25e8ad78b chore: use date order instead of topological for changelog 2022-07-27 14:36:09 +02:00
iCrawl
3f17ff23bf chore: fix changelog 2022-07-27 14:22:13 +02:00
iCrawl
a7dc588d9f chore(proxy): release @discordjs/proxy@1.0.1 2022-07-27 14:16:56 +02:00
iCrawl
2291429d30 chore(ws): release @discordjs/ws@0.1.0 2022-07-27 14:15:59 +02:00
iCrawl
bf7326729d chore(rest): release @discordjs/rest@1.0.1 2022-07-27 14:12:23 +02:00
iCrawl
124d8123b8 chore(collection): release @discordjs/collection@1.0.1 2022-07-27 14:10:17 +02:00
Jiralite
0b61dbf720 docs(InteractionResponses): Add showModal() return type (#8376) 2022-07-27 13:59:26 +02:00
Jiralite
ba6797e742 docs(WebhookClient): Document working options (#8375) 2022-07-27 13:05:47 +02:00
Jiralite
7fd9ed8f13 refactor: Deprecate Formatter class (#8373) 2022-07-27 13:05:31 +02:00
iCrawl
b6bba9901b chore: deps 2022-07-27 12:23:07 +02:00
Jiralite
2130aae321 docs(Message): Document gateway intent for content (#8364) 2022-07-27 12:10:05 +02:00
Jiralite
80b9738957 docs: Use info blocks for requirements (#8361) 2022-07-27 12:09:50 +02:00
A. Román
5d8bd030d6 fix(Formatters): add newline in codeBlock (#8369) 2022-07-27 12:09:34 +02:00
Jiralite
e9920a9c98 docs(WebhookClient): Make constructor a union (#8370)
Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
2022-07-27 12:09:18 +02:00
Jiralite
6d248051cf refactor(PermissionOverwriteManager): Use OverwriteType (#8374) 2022-07-27 12:06:59 +02:00
iCrawl
798466a696 fix: various css for the sidebar 2022-07-26 09:48:40 +02:00
Suneet Tipirneni
1275918ca8 feat(website): group items by symbol kind (#8360)
* feat(website): group items by symbol kind

* chore: make requested changes

* chore: fix darkmode colors

* chore: make requested changes

* Update packages/website/src/components/ListSidebar.tsx

Co-authored-by: Almeida <almeidx@pm.me>

Co-authored-by: Almeida <almeidx@pm.me>
2022-07-26 09:30:57 +02:00
SpaceEEC
a7d49e56fc fix(GuildChannelManager): allow unsetting rtcRegion (#8359) 2022-07-26 09:29:30 +02:00
Ryan Munro
34ba9d1c4c docs: update docs and examples to PascalCase links (#8305)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-07-25 11:13:09 +02:00
Ryan Munro
77ed407f6a feat: restore missing typeguards (#8328) 2022-07-25 11:12:48 +02:00
Rodry
4fc2c60a3b feat(GuildMember): add dmChannel getter (#8281) 2022-07-25 11:12:00 +02:00
Jiralite
9f4446b10f chore: Update update guide link (#8358)
chore: update update guide
2022-07-25 11:09:58 +02:00
Jiralite
78d4295a40 fix(WebSocketShard): Use correct import (#8357) 2022-07-25 11:09:27 +02:00
iCrawl
5a3c9996e0 fix(enums): dark theme colors 2022-07-25 01:38:17 +02:00
iCrawl
4fff6076e7 refactor: cleanup css 2022-07-25 00:55:40 +02:00
Suneet Tipirneni
4bda24678a refactor(website): add typography improvements (#8355)
* refactor(website): add typography improvements

* chore: bold on hover
2022-07-24 21:56:50 +02:00
iCrawl
9ae461d84d chore: rename docker publish 2022-07-24 18:51:26 +02:00
iCrawl
160487d866 chore: fix dockerbuild and add ws props everywhere 2022-07-24 18:49:06 +02:00
iCrawl
41e4e10b48 fix(Layout): refactor to sidebar layout component 2022-07-24 18:28:32 +02:00
Jiralite
200ab91f52 types(GuildAuditLogsEntryExtraField): Use AuditLogOptionsType (#8349) 2022-07-24 17:26:55 +02:00
Jiralite
3839958e3f fix(ThreadChannel): Omit webhook fetching (#8351) 2022-07-24 17:18:08 +02:00
thehairy
58c1b51c5c fix(GuildAuditLogsEntry): replace OverwriteType with AuditLogOptionsType (#8345) 2022-07-24 16:15:51 +02:00
Suneet Tipirneni
6a2d0d8e96 fix(selectMenu): allow json to be used for select menu options (#8322) 2022-07-24 15:14:33 +02:00
Suneet Tipirneni
335695c698 refactor: use next links (#8344)
* chore(website): use next links

* chore: fix deploy check

* chore: use ligher syntax highlighter
2022-07-24 15:14:18 +02:00
DD
8e520f946a fix(ShardClientUtil#_respond): construct global error (#8348) 2022-07-24 15:13:13 +02:00
Jiralite
59a7e52224 fix: Ensure returns for function type definitions (#8346) 2022-07-24 13:44:46 +02:00
Jiralite
af837debe3 chore: Use raw GitHub link to show Vercel logo on website (#8343)
chore: use raw GitHub link to show on docs
2022-07-23 23:38:49 +02:00
Jiralite
df42fdfc42 fix(Presence): Do not return NaN for activity timestamp (#8340) 2022-07-23 18:21:47 +02:00
iCrawl
5f667c0c82 fix: correctly configure middleware 2022-07-23 04:13:16 +02:00
iCrawl
90cbd2bbd5 fix: move middleware into source directory
This needs to be on the same level as the pages directory, sometimes the documentation mentioned "root", but that obviously is not true if you use a src directory
2022-07-23 02:49:24 +02:00
iCrawl
f50382e1ce feat: add middleware for path rewriting 2022-07-23 02:35:21 +02:00
iCrawl
1b03631205 chore: patch all versions of tsdoc-config 2022-07-23 01:57:47 +02:00
iCrawl
a490adfe36 chore: remove hoist and install normally 2022-07-23 01:41:12 +02:00
iCrawl
f097f0bc1f chore: create patch for tsdoc-config 2022-07-23 01:38:21 +02:00
iCrawl
1d63d3ce1c build: explicitly add deps 2022-07-23 01:24:45 +02:00
iCrawl
6d25fb8856 fix(yarn): don't hoist packages for website 2022-07-23 00:36:00 +02:00
iCrawl
86a9be7d33 fix(IRS): also generate index routes 2022-07-23 00:11:19 +02:00
iCrawl
82165d4f80 feat(IRS): next IRS 2022-07-22 23:39:48 +02:00
iCrawl
ee455c812e refactor: switch to next.js 2022-07-22 21:47:06 +02:00
iCrawl
0d687b5606 chore: deps 2022-07-22 19:25:24 +02:00
DD
748d7271c4 feat: @discordjs/ws (#8260)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
2022-07-22 19:13:47 +02:00
SpaceEEC
830c670c61 fix(Client): omit private properties from toJSON (#8337) 2022-07-22 17:11:54 +02:00
iCrawl
74ec7be346 chore: add lint-staged 2022-07-22 01:32:19 +02:00
iCrawl
96b62b6539 ci: rename files to match better naming 2022-07-20 22:33:23 +02:00
iCrawl
8a6ee906a7 ci: better naming for ci 2022-07-20 20:24:09 +02:00
Almeida
1fb7b30963 fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions (#8311)
* fix(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions

* fix(ApplicationCommand): equals()
2022-07-20 20:12:58 +02:00
iCrawl
45c9659080 ci: fix vercel deploy check 2022-07-20 19:03:48 +02:00
iCrawl
07a5cd7048 ci: check deploy branch vercel 2022-07-20 18:49:24 +02:00
iCrawl
d0e3c972b4 chore: reorder release steps 2022-07-20 18:44:44 +02:00
iCrawl
a05386a46c ci: fix docs and dev publishes 2022-07-20 17:22:57 +02:00
Noel
3b0197bd8e build: refactor build system (#8324) 2022-07-20 16:36:42 +02:00
iCrawl
d1245418f9 chore: add license to root 2022-07-19 20:11:23 +02:00
iCrawl
e7d4d41640 chore: use full link for vercel banner in readmes 2022-07-19 19:43:14 +02:00
iCrawl
ce1807dc80 fix(landing): vercel banner not wrapped in a tag 2022-07-19 19:41:14 +02:00
iCrawl
34d3917a28 chore: spacing on vercel logo 2022-07-19 19:38:11 +02:00
iCrawl
9e624abf1a chore(discord.js): release discord.js 2022-07-19 18:40:01 +02:00
iCrawl
8c4b9865e1 fix(landing): vercel banner 2022-07-19 18:33:50 +02:00
iCrawl
dbad1c468b chore: fix root vercel banner 2022-07-19 18:29:41 +02:00
iCrawl
4ffd7f9f80 chore: vercel banner 2022-07-19 18:26:03 +02:00
advaith
660e212e83 fix(Components): support emoji id strings (#8310) 2022-07-19 14:56:21 +02:00
iCrawl
70dd757ec3 refactor(theme): switch theme detection to use class 2022-07-18 19:53:07 +02:00
Suneet Tipirneni
b5d4b2d78b feat(website): add basic landing page (#8313)
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-07-18 19:11:18 +02:00
iCrawl
78d013f87c ci: fix building before linting/testing 2022-07-18 14:20:11 +02:00
iCrawl
21d61ca260 chore: remove parallel execution 2022-07-18 14:09:45 +02:00
iCrawl
b316ac7cc4 ci: remove turbo cache 2022-07-18 13:16:16 +02:00
iCrawl
ed94b3d9ec chore: change versions 2022-07-18 12:52:15 +02:00
iCrawl
dcbbecfed2 chore: dev version 2022-07-18 12:28:39 +02:00
iCrawl
0c5e37d515 chore(discord.js): release discord.js 2022-07-18 12:26:49 +02:00
iCrawl
656e9550db fix: default package to discord.js 2022-07-18 12:21:48 +02:00
DD
3a7e93df57 fix(DataResolver#resolveImage): adjust to updated resolveFile (#8308) 2022-07-18 12:17:46 +02:00
iCrawl
66092cad8b feat(theme): dark theme detection 2022-07-18 02:57:29 +02:00
iCrawl
ec230faa4d feat(theme): better dark theme 2022-07-18 02:35:34 +02:00
iCrawl
cd13a4a902 fix(sidebar): styling issues 2022-07-18 02:14:38 +02:00
iCrawl
dda2895bfb chore: release bump 2022-07-17 22:37:01 +02:00
iCrawl
f0b77348d3 chore: bump dev version 2022-07-17 22:18:45 +02:00
iCrawl
b0a9131b1c chore(discord.js): release discord.js 2022-07-17 22:15:00 +02:00
iCrawl
29be5b570b chore: deps 2022-07-17 22:06:54 +02:00
iCrawl
d677c31161 chore: update dev versions 2022-07-17 22:05:32 +02:00
iCrawl
f6ef92ad6a chore: release @discordjs/builders, @discordjs/collection, @discordjs/proxy, @discordjs/rest 2022-07-17 22:02:32 +02:00
Jiralite
52a9e213c2 fix(GuildMemberManager): Allow setting own nickname (#8066) 2022-07-17 21:47:02 +02:00
Almeida
b7e62380f2 test(builders): improve coverage (#8274) 2022-07-17 21:20:26 +02:00
Lo
cafde77d73 refactor(Util)!: rename fetchRecommendedShards (#8298) 2022-07-17 21:17:49 +02:00
Rodry
b7d4e55419 types(GuildFeature): allow feature strings to be passed (#8264)
Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>
2022-07-17 21:14:54 +02:00
Almeida
5aeed99350 docs: align webhook method return types with implementation (#8253) 2022-07-17 21:14:25 +02:00
Jiralite
452dec57ca docs: Remove @private constructor documentation (#8255) 2022-07-17 21:13:54 +02:00
Jiralite
64f814066c refactor(Embed): Add all the types (#8254) 2022-07-17 21:13:40 +02:00
Rodry
33a7a5cbdc types(CategoryChannelChildManager): fix Holds type (#8288) 2022-07-17 21:12:22 +02:00
iCrawl
edf83f02ea chore: bump dev versions 2022-07-17 21:05:21 +02:00
iCrawl
25bd771559 chore(voice): release @discordjs/voice@0.11.0 2022-07-17 21:04:18 +02:00
iCrawl
f2ca0ca6f9 chore(rest): release @discordjs/rest@0.6.0 2022-07-17 21:03:35 +02:00
iCrawl
6712de9752 chore(collection): release @discordjs/collection@0.8.0 2022-07-17 20:59:54 +02:00
iCrawl
28cd293f14 chore: update changelog 2022-07-17 19:42:10 +02:00
iCrawl
3f5690afe1 chore(builders): bump dev version 2022-07-17 19:31:32 +02:00
iCrawl
015ab69956 chore(builders): release @discordjs/builders@0.16.0 2022-07-17 19:28:12 +02:00
iCrawl
caecc574f0 chore: deps 2022-07-17 19:20:40 +02:00
BattleEye
3bf30b1e6d fix(PermissionOverwriteManager): mutates user (#8283) 2022-07-17 18:59:10 +02:00
DD
103a3584c9 refactor(rest): add content-type(s) to uploads (#8290) 2022-07-17 18:55:25 +02:00
Almeida
bf65b37d1a types: remove MemberMention (#8292) 2022-07-17 18:54:44 +02:00
Parbez
7e6dbaaed9 types: remove expect error (#8242) 2022-07-17 18:53:40 +02:00
CallMe AsYouFeel
1a6ddbbe7b fix(VoiceReceiver): parsePacket correctly (#8277) 2022-07-17 18:52:35 +02:00
Tiemen
32f9056b15 fix: slash command name regex (#8265) 2022-07-17 18:52:18 +02:00
Jiralite
3648f6d567 fix(GuildChannelManager): Access resolveId correctly (#8296) 2022-07-17 18:51:25 +02:00
Almeida
bddb6a461c chore: ignore index files in coverage (#8293)
Co-authored-by: ckohen <chaikohen@gmail.com>
2022-07-17 18:51:03 +02:00
Jiralite
fe34f48efb chore: Remove --cache (#8279) 2022-07-13 16:58:40 +02:00
Jeroen Claassens
30a8d3231f chore: update Git Cliff TOMLs (#8276) 2022-07-13 09:49:17 +02:00
Suneet Tipirneni
1ed605eaa4 feat(website): add extends clauses, enum members and automatic -types links (#8270)
* feat(website): add extends clauses, enum members and automatic -types links

* chore: remove vscode settings

* refactor: remove util file
2022-07-12 22:42:32 +02:00
muchnameless
787654816d fix(GuildChannelManager): edit lockPermissions (#8269) 2022-07-12 22:34:14 +02:00
Eejit
f0b68d5736 refactor: make GuildAuditLogsEntry.action return an AuditLogEvent (#8256) 2022-07-09 19:55:24 +02:00
Jiralite
75256153a9 types(GuildMemberManager): Fix placement for fetchMe() (#8258) 2022-07-09 19:43:02 +02:00
Suneet Tipirneni
33ae7df000 feat(website): add detailed property and method documentation (#8252)
Co-authored-by: Noel <buechler.noel@outlook.com>
2022-07-08 22:03:18 +02:00
Tyler Resch
feb3bdda0a types: convert Events to an enum (#8246) 2022-07-08 16:02:48 +02:00
Suneet Tipirneni
e78c9c9ee9 feat(website): show package members in a sidebar (#8245)
* feat(website): show package members in a sidebar

* fix: put response instead of loader

* Apply suggestions from code review

Co-authored-by: Noel <buechler.noel@outlook.com>

* chore: make requested changes

* refactor: make only package list scrollable

* feat: make sidebar mobile responsive

* fix: breakpoints for sidebar

Co-authored-by: Noel <buechler.noel@outlook.com>
2022-07-07 22:09:19 +02:00
MateoDeveloper
43f62bb667 docs(ApplicationCommand): add min_length and max_length to ApplicationCommandOptionData (#8239) 2022-07-07 20:46:06 +02:00
Parbez
96c8d21f95 feat(builder): add max min length in string option (#8214) 2022-07-07 20:45:32 +02:00
Anton Istomin
10ba0080cc fix(recorder-example): bump dependencies (#8123) 2022-07-06 22:25:10 +02:00
iCrawl
0b979b04f2 chore: add blocked label 2022-07-06 21:17:07 +02:00
Parbez
a4d1862982 refactor(builder): remove unsafe*Builders (#8074) 2022-07-06 20:42:51 +02:00
Suneet Tipirneni
34531c45e3 feat(website): add support for type parameter documentation (#8237) 2022-07-06 17:37:33 +02:00
Parbez
8198da5cd0 types(builder): remove casting (#8241) 2022-07-06 12:28:00 +02:00
iCrawl
ba10637529 chore: deps 2022-07-06 10:43:06 +02:00
iCrawl
68c3d8743e refactor(createApiModel): reusable function for api model creation 2022-07-05 17:00:44 +02:00
Almeida
a51f7215ec test(collection): improve coverage (#8222) 2022-07-05 16:10:42 +02:00
Jiralite
c271e05223 fix(SpeakingMap): Allow docgen to detect event name (#8236) 2022-07-05 16:10:23 +02:00
Almeida
d2e74003d5 chore: remove docgen test stuff (#8231) 2022-07-05 14:13:11 +02:00
ckohen
fd1c24036f fix(codecov): use cobertura (#8235) 2022-07-05 12:32:05 +02:00
ckohen
eb9ad46d4f fix(coverage): upload lcov instead of clover (#8234) 2022-07-05 10:52:38 +02:00
Almeida
5bd6b28b3e fix(Collection): make error messages consistent (#8224) 2022-07-04 17:40:33 +02:00
ckohen
f6db285c07 docs: add codecov coverage badge to readmes (#8226)
* docs: add codecov coverage badge to readmes

* docs: fix tab-space consistency
2022-07-04 14:00:27 +02:00
Almeida
68ade870f8 chore: upgrade vitest and add it as dep on each workspace (#8223) 2022-07-04 11:51:48 +02:00
Jiralite
c7a205f7b9 types(GuildMemberManager): Non-void return of edit() (#8186) 2022-07-03 18:04:29 +02:00
Almeida
c5750d59f5 refactor: make ShardEvents the events of Shard (#8185) 2022-07-03 18:04:19 +02:00
Suneet Tipirneni
31d5930464 fix(SelectMenuBuilder): properly accept SelectMenuOptionBuilders (#8174) 2022-07-03 18:04:08 +02:00
Jiralite
cdd9214212 fix: Remove global flag on regular expressions (#8177) 2022-07-03 15:36:53 +02:00
A. Román
fa010b5162 fix(MessagePayload): guard against repliedUser property (#8211) 2022-07-03 15:36:32 +02:00
A. Román
6b20645740 refactor(Util): make single replace call in cleanContent (#8210)
Co-authored-by: Almeida <almeidx@pm.me>
2022-07-03 15:36:20 +02:00
Almeida
50d55bd6b8 fix(ApplicationCommandManager): explicitly allow passing builders to methods (#8209) 2022-07-03 15:35:59 +02:00
Almeida
2d9dfa3c6e fix(TextInputBuilder): parse custom_id, label, and style (#8216) 2022-07-03 15:35:19 +02:00
Tyler Resch
ab238a9046 docs(MessageInteraction#commandName): updated description (#8212)
Co-authored-by: A. Román <kyradiscord@gmail.com>
2022-07-03 15:34:47 +02:00
Parbez
94ee60d3d4 feat(applicationCommand): add max min length in string option (#8215) 2022-07-03 15:34:04 +02:00
ckohen
f10f4cdcd8 feat: codecov (#8219) 2022-07-03 15:33:18 +02:00
Suneet Tipirneni
d95197cc78 feat: add website documentation early mvp (#8183)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2022-07-01 20:54:15 +02:00
Jiralite
e0c8282490 docs: Add missing @extends (#8205) 2022-07-01 17:48:11 +02:00
tnfAngel
741b3c8e27 docs: Remove Music bot in voice examples (#8203) 2022-07-01 10:54:11 +02:00
iCrawl
819a1fdf7d ci: check for main package before moving api-extractor docs 2022-06-30 16:17:52 +02:00
iCrawl
ce9afbb8e4 ci: fix building before generating docs 2022-06-30 15:56:07 +02:00
iCrawl
b2776c22d4 ci: api-extractor support for docs 2022-06-30 15:46:14 +02:00
DD
525bf031a5 chore: revert pre-commit hook to not change state (#8200) 2022-06-30 11:47:27 +02:00
CarelessInternet
27d8deb471 types: add missing shard types (#8180) 2022-06-30 00:37:55 +02:00
Xaliks
11b1739319 fix(GuildMemberRemove): remove member's presence (#8181) 2022-06-30 00:37:47 +02:00
Jiralite
b83e0c0caf types: Implement GuildChannelEditOptions (#8184) 2022-06-30 00:37:38 +02:00
Almeida
8421f9203b types(Status): add missing members (#8179) 2022-06-30 00:37:31 +02:00
A. Román
cb3dca4ae0 refactor(ApplicationCommandManager): use makeURLSearchParams (#8196) 2022-06-30 00:36:47 +02:00
MateoDeveloper
002d6a5aed feat(BaseInteraction): add support for app_permissions (#8194)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-30 00:36:32 +02:00
DD
c4653f97b1 feat(util): parseWebhookURL (#8166)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-06-25 11:02:11 +02:00
Suneet Tipirneni
e24970e3c3 refactor: Use Base prefix for channel and interaction base classes (#8099) 2022-06-24 10:42:50 +02:00
Tyler Resch
65dc8d677e types(GuildScheduledEvent#scheduledStartAt): should be nullish (#8111) 2022-06-24 10:42:39 +02:00
Almeida
0ffbef506a fix: edit() data can be partial and defaultMemberPermissions can be null (#8163) 2022-06-24 10:42:20 +02:00
iCrawl
5d3dd55a26 chore(changelog): add v13 changelog 2022-06-23 18:28:32 +02:00
Skick
70b42bb64a types(voice): bring back typed events (#8109) 2022-06-23 12:39:36 +02:00
Jan
af04992ed3 docs(Constants): fix SweeperKeys type (#8157) 2022-06-23 12:37:12 +02:00
ckohen
bbdb5d980b revert: refactor: move eslint.tsconfig.json to root (#8159) 2022-06-23 12:36:42 +02:00
Suneet Tipirneni
7279f9c31b types: fix modal builder constructor data type (#8143) 2022-06-22 20:37:46 +02:00
Jiralite
5e5853a4e8 docs(Channels): internally document channel creation (#8154) 2022-06-22 20:37:24 +02:00
Jiralite
cd17aad720 refactor(Constants): Remove leftover code (#8156)
* refactor(Constants): tidy up file

* docs(Constants): add type definition
2022-06-22 20:36:58 +02:00
Jiralite
ee36d60dc6 docs: Update threads to use ThreadAutoArchiveDuration (#8153) 2022-06-22 20:34:41 +02:00
SpaceEEC
c34c02ab8d fix(WebSocketShard): keep an error handler on connections (#8150) 2022-06-22 20:34:11 +02:00
Almeida
31f658247f fix(DJSError): error code validation (#8149) 2022-06-22 20:33:47 +02:00
Jiralite
a3799f9ebb types: Use ThreadAutoArchiveDuration from discord-api-types (#8145) 2022-06-22 11:23:39 +02:00
Jiralite
a061233510 docs(APITypes): Remove duplicate type definition (#8144) 2022-06-22 11:23:17 +02:00
Jiralite
203bc4a2cf docs: Document missing type definitions (#8130)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-06-22 11:23:03 +02:00
Parbez
65d1879c0a chore: move deps to root and some miscellaneous changes (#8129) 2022-06-21 15:15:38 +02:00
Parbez
c6f285b7b0 refactor: remove @sindresorhus/is as it's now esm only (#8133) 2022-06-21 14:41:33 +02:00
pat
2eeaad6f27 fix(vcs): nsfw property (#8132) 2022-06-21 14:35:42 +02:00
pat
f1ac17c961 docs(InteractionResponse): fix return (#8141) 2022-06-21 14:35:33 +02:00
Jiralite
db2b0333d9 fix(WebSocketManager): Correct error name (#8138) 2022-06-21 14:35:17 +02:00
DD
94f7ca9474 chore: update proxy-container README (#8122)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-20 14:47:19 +02:00
DD
e68effa822 refactor: errors (#8068)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-06-20 14:46:35 +02:00
iCrawl
358c3f4a46 chore: upgrade deps 2022-06-19 13:19:24 +02:00
DD
268a9b4be5 fix: vitest recursion (#8121) 2022-06-19 13:18:36 +02:00
KinectTheUnknown
95e6d6ede0 types(Shard#reconnecting): fix event name (#8118) 2022-06-19 12:24:04 +02:00
DD
17867f9154 fix(proxy-container): proper deps (#8120) 2022-06-19 12:17:47 +02:00
Jiralite
3a77ce0b18 docs(PermissionsBitField): Fix @name of bitfield (#8115)
docs(PermissionsBitField): `Permission` -> `PermissionsBitField`
2022-06-18 18:42:47 +02:00
Jiralite
23e183a9ac fix(WebSocketShard): Disconnected casing (#8117) 2022-06-18 18:42:30 +02:00
Parbez
b3c3a94d5d ci: don't run publish workflow on forks (#8116) 2022-06-18 18:42:09 +02:00
DD
8610700c87 fix(ci): log into dockerhub properly (#8114) 2022-06-18 13:59:05 +02:00
Jiralite
db663a55c2 docs: TextBasedChannel -> TextBasedChannels typos (#8110) 2022-06-18 13:02:41 +02:00
DD
0673ea377a fix(proxy-container): add @discordjs/rest to deps (#8113) 2022-06-18 13:02:12 +02:00
DD
2681929e42 feat: proxy container (#8000) 2022-06-17 23:29:50 +02:00
Jiralite
0a138dab95 docs: Remove numbers from enums (#8098) 2022-06-17 23:28:30 +02:00
Jiralite
415513696c docs(GuildAuditLogs): Fix and reimplement type definitions (#8108) 2022-06-17 23:27:54 +02:00
Almeida
90a98fee16 refactor(ClientOptions): remove $ prefix from ws.properties keys (#8094) 2022-06-17 23:26:42 +02:00
advaith
386c41f24f docs(WebSocketOptions): add version to docs and typings (#8050) 2022-06-17 23:26:08 +02:00
pat
d54bf5d286 fix(webhooks): revert webhook caching (and returning Message) (#8038) 2022-06-17 23:25:46 +02:00
Jiralite
e5ec1c4dbc refactor: Use GuildFeature enum (#8101) 2022-06-17 23:25:29 +02:00
Jiralite
ad9ab2b177 chore: Add MessageContent to issue form (#8106) 2022-06-17 23:24:26 +02:00
Rodry
4df491ce85 types(ApplicationCommand): fix typo in setDMPermission (#8097) 2022-06-16 09:59:46 +02:00
Jiralite
0a44b05db8 fix(ApplicationCommand): Remove autocomplete check at the top level and correctly check for dmPermission (#8100) 2022-06-16 09:58:54 +02:00
Almeida
b4e28a8ff6 types: fix setType() parameter and ChannelData.type (#8089) 2022-06-13 23:43:10 +02:00
Jiralite
9c0f190de1 docs(BaseGuildTextChannel): Update setType()'s parameter type (#8088) 2022-06-13 22:09:00 +02:00
BaumianerNiklas
093117d938 chore: remove -types import in readme example (#8085) 2022-06-13 21:42:28 +02:00
Suneet Tipirneni
e53d162198 refactor(util): make utility functions top level (#8052)
* refactor(util): make functions top level

* types: make channel typeguards more strict

* chore: make requested changes
2022-06-13 20:04:53 +02:00
Almeida
51eadf3737 docs: update outdated examples (#8081) 2022-06-13 18:18:15 +02:00
Jiralite
552ec72542 docs(ThreadMemberManager): Require member in FetchThreadMemberOptions (#8079) 2022-06-13 18:17:44 +02:00
Ben
ac7bf692bf docs(AutocompleteInteraction): change useless log in responds example (#8077) 2022-06-13 18:16:54 +02:00
n1ck_pro
9964454c29 types: fix ApplicationCommandPermissionsUpdate event typings (#8071) 2022-06-13 18:16:07 +02:00
Rodry
476b7d519c types(AutocompleteOption): fix and improve types (#8069) 2022-06-13 18:15:31 +02:00
Jiralite
10a6c4287d feat(AutocompleteInteraction): Add commandGuildId (#8086) 2022-06-13 18:14:01 +02:00
Jiralite
a2eebf6c66 docs: Description and missing @typedef fixes (#8087) 2022-06-13 18:12:08 +02:00
CodeGoat
96053babe1 fix(ApplicationCommand): fix default member permissions assignment (#8067) 2022-06-11 11:05:43 +02:00
ckohen
f527dea36e fix(scripts): read directory and rerun (#8065) 2022-06-11 11:04:53 +02:00
ckohen
c7391db11b refactor(ApplicationCommand): permissions v2 (#7857)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-06-10 21:34:17 +02:00
Suneet Tipirneni
c5176be14b feat(guild): add support for setting MFA level (#8024) 2022-06-10 21:26:11 +02:00
Parbez
fbe67e1025 fix: select menu options to accept both rest and array (#8032)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-06-10 21:22:04 +02:00
Parbez
3bb9c0e5c3 fix: check for function type (#8064) 2022-06-10 21:21:45 +02:00
DD
9c8b3102ce refactor(*): include name/reason/etc fields into options/data params (#8026) 2022-06-10 21:20:59 +02:00
Jiralite
2392a6f5de types(ThreadMemberManager): Fix return type of fetching members with no arguments (#8060)
* types(ThreadMemberManager): non-optional first overload for fetching

* test: organisation
2022-06-10 21:20:00 +02:00
Parbez
c0f079d232 typings: remove isAutocomplete typeguard from typings (#8063) 2022-06-10 21:19:44 +02:00
Jiralite
d8077c6839 fix(CommandInteractionOptionResolver): Handle autocompletion interactions (#8058) 2022-06-10 21:19:27 +02:00
iCrawl
d4b41dd081 feat(docgen): proper event parsing for typescript 2022-06-10 16:22:11 +02:00
pat
0415300243 feat(vcs): add missing property and methods (#8002) 2022-06-10 13:42:53 +02:00
Jeroen Claassens
caee94897f build: fix git cliff config files (#8057) 2022-06-10 13:37:24 +02:00
iCrawl
b3346f4b9b feat(docgen): update typedoc 2022-06-10 12:59:46 +02:00
iCrawl
2791c86cdf chore: remove unneeded tsc build 2022-06-09 21:27:06 +02:00
Almeida
c8f1690896 refactor(collection): remove default property (#8055) 2022-06-09 20:53:23 +02:00
Jiralite
da9107c007 refactor(ThreadMemberManager): Consistent thread member fetching (#8021) 2022-06-09 20:52:56 +02:00
Suneet Tipirneni
f57d6768ad refactor(interactions): remove redundant interaction typeguards (#8027) 2022-06-09 20:52:44 +02:00
iCrawl
d7b8357dcb fix(docgen): strip dots from return types 2022-06-09 20:47:51 +02:00
A. Román
16810f3e41 refactor(collection): remove default export (#8053) 2022-06-09 16:53:01 +02:00
A. Román
598f61b992 fix(scripts): add quotes around blob arguments (#8054) 2022-06-09 16:52:18 +02:00
iCrawl
50401453e7 fix(docgen): shorten output for path info 2022-06-09 16:14:37 +02:00
Almeida
94bdcaca62 docs: ignore docs of unexported functions (#8051) 2022-06-09 13:58:42 +02:00
iCrawl
eea139b346 feat(docgen): support for ignore tag 2022-06-09 13:54:35 +02:00
iCrawl
50822f5254 fix(docgen): parsing constructor 2022-06-09 11:37:22 +02:00
muchnameless
f2b267c079 fix(Message): force fetching (#8047) 2022-06-09 10:35:52 +02:00
advaith
b2eea1c900 docs(ClientOptions): fix closeTimeout default (#8049) 2022-06-09 10:35:27 +02:00
iCrawl
3ae2633c3f feat(website): add some styling 2022-06-08 23:40:03 +02:00
iCrawl
3937b402c0 fix(website): don't build concurrently 2022-06-08 22:26:39 +02:00
iCrawl
256c4f955c feat(website): unocss 2022-06-08 21:45:16 +02:00
iCrawl
33cdcdbb7a fix: vercel deployment 2022-06-08 20:09:23 +02:00
iCrawl
bc466a5997 fix(website): deployment 2022-06-08 19:36:09 +02:00
Noel
127931d1df feat: website (#8043) 2022-06-08 19:13:31 +02:00
iCrawl
5259639c2c fix: doc generation for return types 2022-06-08 19:12:42 +02:00
iCrawl
5de9b80814 fix: returns for typescript parsing 2022-06-08 18:41:22 +02:00
iCrawl
bc4fbcef2e fix(serializer): properly serialize data 2022-06-08 18:11:25 +02:00
iCrawl
3279b40912 feat(docgen): typescript support 2022-06-08 17:26:54 +02:00
Synbulat Biishev
1afae909d7 fix(Attachment): do not destructure data (#8041) 2022-06-08 13:30:06 +02:00
iCrawl
65cb36166f fix(VarType): parsing type names 2022-06-08 13:27:41 +02:00
Superchupu
ecc6600df2 refactor(docgen): use the node: protocol (#8034)
Co-authored-by: Synbulat Biishev <syjalo.dev@gmail.com>
2022-06-08 00:17:48 +02:00
iCrawl
314d76e907 fix(docgen): fix up method return types 2022-06-07 15:19:42 +02:00
Parbez
769ea0bfe7 refactor: move all the config files to root (#8033) 2022-06-07 12:35:19 +02:00
Noel
8b979c0245 feat: docgen package (#8029) 2022-06-07 10:51:33 +02:00
Noel
5475767c2c build: use cliff-jumper for releases (#8030) 2022-06-07 00:59:21 +02:00
Jiralite
86d8fbc023 fix(DirectoryChannel): Type name and handle url (#8023) 2022-06-06 15:47:13 +02:00
iCrawl
fba9710fc9 chore(builders): dev version 2022-06-06 14:45:46 +02:00
iCrawl
5ca3974301 chore(release): version 2022-06-06 14:44:25 +02:00
iCrawl
3202c91c5a chore: properly adapt changelog script 2022-06-06 14:43:15 +02:00
Jiralite
f3f34f07b3 docs(DirectoryChannel): Extend Channel (#8022) 2022-06-06 14:24:35 +02:00
Parbez
f8ed71bfca fix: readd isThread type guard (#8019) 2022-06-06 14:24:03 +02:00
Voxelli
e1176faa27 feat: backport handle zombie connection (#7626)
* feat: backport zombie connection fixes

* fix: enums

* fix: prettier

* feat: add zombie connection event to shard events

* Apply suggestions from code review

Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>

* fix: prettier

* fix: handleZombieConnection

* feat: backport new logic of handling zombie connection

Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
2022-06-06 12:21:35 +02:00
Caleb Lam
aa59a409b3 feat(CommandInteraction): add 'commandGuildId' (#8018) 2022-06-06 10:07:37 +02:00
Rodry
7fa698d23e types(AttachmentBuilder): fix data type (#8016)
* types(AttachmentBuilder): fix data type

* types(MessageOptions): add AttachmentPayload
2022-06-06 10:07:15 +02:00
markisha64
b9df37a89f refact: Sticker's tags property (#8010) 2022-06-05 23:29:31 +02:00
Rodry
ad75be9a9c feat: allow builders to accept rest params and arrays (#7874)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: Khafra <42794878+KhafraDev@users.noreply.github.com>
2022-06-05 23:29:16 +02:00
Suneet Tipirneni
70c733bb9a refactor(channel): remove redundant channel type guards (#8012) 2022-06-05 23:29:05 +02:00
Rodry
a3287782b5 feat(MessageReaction): add react method (#7810) 2022-06-05 23:28:44 +02:00
Suneet Tipirneni
0ccc243c8f types(modal): fix showModal() typings (#8014) 2022-06-05 23:28:28 +02:00
Almeida
0a7953e463 docs(Attachment): remove constructor doc (#8009) 2022-06-05 23:28:18 +02:00
Parbez
6aa623240e types: fix some attachment related typings (#8013) 2022-06-05 22:37:56 +02:00
n1ck_pro
6266b0c1e3 types(AttachmentBuilder): remove name parameter from constructor (#8008) 2022-06-05 22:37:01 +02:00
Suneet Tipirneni
9720e55534 refactor: always return Message instances in interactions (#7917)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-05 19:00:35 +02:00
Parbez
ad36c0be77 fix: add static method from in builders (#7990) 2022-06-05 18:33:19 +02:00
SpaceEEC
5987dbe5cf docs(VoiceChannel): annotate that it is implementing TextBasedChannel (#8007) 2022-06-05 18:30:14 +02:00
Rodry
5244fe3c1c feat(Collector): add ignore event (#7644)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
2022-06-05 18:29:13 +02:00
Synbulat Biishev
349766dd69 feat(GuildMemberManager): add GuildMemberManager#fetchMe() (#7526) 2022-06-05 18:29:00 +02:00
markisha64
7a1095b66b fix: typings (#7965)
Co-authored-by: Almeida <almeidx@pm.me>
2022-06-05 09:36:59 +02:00
iCrawl
10009a43ee ci: remove cache-dir from test 2022-06-05 01:14:39 +02:00
iCrawl
8d8e6c03de feat: use vitest instead of jest for more speed 2022-06-05 01:07:10 +02:00
Suneet Tipirneni
dfadcbc2fd refactor(attachment): don't return attachment builders from API (#7852)
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: A. Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-06-04 22:33:13 +02:00
n1ck_pro
546d48655f docs: add missing discord-api-types external types (#8001) 2022-06-04 22:27:01 +02:00
iCrawl
f8739bd9c0 fix(voice): re-add accidental removal of postbuild script 2022-06-04 19:15:28 +02:00
iCrawl
f2ae1f9348 feat: add scripts package for locally used scripts 2022-06-04 19:07:50 +02:00
iCrawl
3401fd4eb6 chore: remove leftover files from pre-monorepo era 2022-06-04 18:41:37 +02:00
iCrawl
fdbd229832 ci: equality check on tag and package name 2022-06-04 17:57:07 +02:00
iCrawl
9e8e2411c1 ci: check for the correct prop to be defined 2022-06-04 17:51:31 +02:00
iCrawl
c02ced9a22 ci: fix if checks for branch/tag when using workflow dispatch 2022-06-04 17:37:00 +02:00
iCrawl
8c5a7f80ef ci: fix inputs for workflow dispatches 2022-06-04 17:15:08 +02:00
iCrawl
14018b0118 ci: allow workflow dispatches 2022-06-04 17:13:40 +02:00
iCrawl
8095723604 chore: only build cjs for actions 2022-06-04 17:08:26 +02:00
iCrawl
e17bb54c85 chore: update dev versions 2022-06-04 17:01:47 +02:00
iCrawl
e92d937bcc chore: release packages 2022-06-04 16:59:00 +02:00
iCrawl
091f1bd170 chore: deps 2022-06-04 16:49:47 +02:00
iCrawl
bd2cf20ecb chore: re-generate changelogs 2022-06-04 16:42:00 +02:00
iCrawl
8af916dba0 chore: remove accidental changelog for voice 2022-06-04 16:22:31 +02:00
iCrawl
781a6e013c chore: fix changelogs 2022-06-04 16:20:33 +02:00
iCrawl
2172a00c50 chore: remove unneeded actions dep 2022-06-04 15:45:18 +02:00
iCrawl
271b1c8e5d feat: actions for workflows 2022-06-04 15:34:40 +02:00
iCrawl
6b8ef20cb3 style: cleanup tests and tsup configs 2022-06-04 15:21:57 +02:00
iCrawl
a45bef4cad fix(proxy): add docs script 2022-06-04 13:34:57 +02:00
DD
1ba2d2a898 feat: @discordjs/proxy (#7925)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
2022-06-04 13:26:25 +02:00
iCrawl
e518c8a137 chore: update yarn 2022-06-04 13:13:52 +02:00
iCrawl
80cd4a4a43 ci: run assigning reviewers also on drafts 2022-06-04 12:59:54 +02:00
iCrawl
8a7cd10554 fix(builders): leftover invalid null type 2022-06-04 12:59:26 +02:00
iCrawl
251862ea57 chore: deps 2022-06-04 12:58:09 +02:00
Jiralite
2f03f9ad3f fix(GuildAuditLogs): Cache guild scheduled events (#7951) 2022-06-04 09:04:08 +02:00
Suneet Tipirneni
db81127886 chore: add external links for dapi-types (#7966) 2022-06-04 09:03:05 +02:00
Suneet Tipirneni
cdd2ba036a feat(guildChannelManager): add videoQualityMode option for create() (#7980)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-06-04 09:02:21 +02:00
Suneet Tipirneni
97eaab35d7 feat(rest): add guild member banner cdn url (#7973) 2022-06-04 09:00:39 +02:00
Suneet Tipirneni
d60c464e61 types: add types to EventEmitter static methods (#7986) 2022-06-04 08:58:15 +02:00
Suneet Tipirneni
643dab3b1b refactor: clean up modal submissions (#7994)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-06-04 08:57:19 +02:00
Azarias B
68d5169f66 feat: Export types from interactions/slashCommands/mixins (#7942) 2022-05-25 10:04:20 +02:00
Suneet Tipirneni
7f4d411e73 chore: reexport all dapi-types (#7909) 2022-05-25 10:03:51 +02:00
Jeroen Claassens
636d4f263b chore: fix git cliff configs (#7948)
Co-authored-by: Vlad <kingdgrizzle@gmail.com>
2022-05-25 10:02:17 +02:00
Jiralite
fdeac9d9fb types: nullify guildScheduledEventUpdate's old parameter (#7955) 2022-05-21 02:02:57 +02:00
Suneet Tipirneni
adf461baf4 fix: make sure action row builders create djs builders (#7945) 2022-05-18 21:56:56 +02:00
DD
191510b7f8 fix(TextBasedChannel#bulkDelete): return deleted message (#7943) 2022-05-18 19:58:39 +02:00
DD
e2f5a4a494 chore: enable noUncheckedIndexAccess (#7931) 2022-05-18 19:56:42 +02:00
A. Román
993eb74475 chore(deps): update discord-api-types and /voice (#7934) 2022-05-18 19:54:35 +02:00
DD
dfe449c253 feat: REST#raw (#7929) 2022-05-17 16:31:19 +02:00
Jiralite
5e9b757a37 fix: Remove trailing invites on channel deletion (#7932) 2022-05-16 12:13:02 +02:00
Sam
28172ca7b5 fix(DataResolver): fix check for readable streams (#7928) 2022-05-16 12:12:34 +02:00
Vlad Frangu
7ce641d33a fix(SlashCommandBuilder): import Permissions correctly (#7921) 2022-05-14 22:47:26 +02:00
Khafra
e92b17d855 fix(REST): remove dom types (#7922) 2022-05-14 18:39:12 +02:00
Khafra
d1504f2ae1 fix: ok statusCode can be 200..299 (#7919) 2022-05-14 18:38:05 +02:00
Jiralite
b1a3aa97ea chore: bump discord-api-types (#7923) 2022-05-14 18:37:01 +02:00
iCrawl
d522320aa4 chore: update v13 changelog 2022-05-13 12:11:36 +02:00
Khafra
76694c1497 feat(EnumResolvers): remove Enumresolvers (#7876) 2022-05-13 11:35:08 +02:00
Vlad Frangu
de3f1573f0 feat(builders): add new command permissions v2 (#7861) 2022-05-13 11:33:40 +02:00
Synbulat Biishev
aed687b09f feat: move me to GuildMemberManager manager (#7669)
Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2022-05-12 22:51:28 +02:00
n1ck_pro
e07b910e68 types: make CacheType generic more accurate for return values (#7868) 2022-05-12 22:50:31 +02:00
Khafra
d1ec8c37ff feat(rest): use undici (#7747)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
2022-05-12 22:49:15 +02:00
Parbez
4515a1ea80 chore: bump shapeshift for faster object validation (#7914) 2022-05-12 12:09:50 +02:00
Vlad Frangu
c1b5e731da fix: add localizations for subcommand builders and option choices (#7862) 2022-05-12 10:32:27 +02:00
Suneet Tipirneni
64bdf53116 types(guildScheduledEvent): Mark entityMetadata as nullable (#7908) 2022-05-12 10:30:26 +02:00
Ben
d308c66eec docs(InteractionResponses): replace outdated Embed example for reply (#7875) 2022-05-12 10:29:44 +02:00
Jiralite
dfd9eb20b2 refactor(ThreadChannel): Remove MAX helper from threads (#7846) 2022-05-12 10:29:21 +02:00
Ryan Munro
19eaed6390 fix(AuditLog): default changes to empty array (#7880) 2022-05-12 10:26:07 +02:00
SpaceEEC
4ba0f56b6a feat(VoiceChannel): add support for text in voice (#6921) 2022-05-02 09:39:14 +02:00
advaith
5eeef3f708 types(discord.js): export missing enums (#7864) 2022-05-02 09:37:46 +02:00
with-heart
679dcda970 feat(REST): enable setting default authPrefix (#7853) 2022-04-28 13:08:02 +02:00
newracket
df64d3ea38 fix(Util): flatten ignoring certain fields (#7773) 2022-04-26 00:45:52 +02:00
Jiralite
6239d83c4d fix: possibly missing (#7829) 2022-04-26 00:31:21 +02:00
Khafra
0c18dab128 fix: endReason not being properly set in base Collector (#7833)
* fix: `endReason` not being properly set in base Collector

* types: add _endReason type
2022-04-26 00:31:12 +02:00
Almeida
ece628986c types: fix return type of toString() on channels (#7836)
* types(DMChannel): `toString()` returns a `UserMention`

* test: add more tests
2022-04-26 00:31:05 +02:00
Jiralite
f4ccc6772c docs: require parameter (#7838) 2022-04-26 00:30:58 +02:00
Almeida
5ba7740fcf refactor(Activity): remove undocumented properties (#7844) 2022-04-26 00:30:45 +02:00
Almeida
bfeaf856f7 types(Message#activity): make partyId optional and use enum for type (#7845) 2022-04-26 00:30:13 +02:00
FIRE
361709332b fix(SelectMenuBuilder): options array (#7826) 2022-04-22 20:50:36 +02:00
Rodry
61a44c509c docs(ApplicationCommand): fix and improve localization docs (#7804) 2022-04-21 19:07:49 +02:00
Hyro
4ac91c61d0 fix(Activity): platform type (#7805) 2022-04-21 19:07:18 +02:00
Hyro
4972bd87c1 fix(ApplicationCommand): equal nameLocalizations and descriptionLocalizations (#7802) 2022-04-21 19:06:42 +02:00
Euan Caskie
a1b145e0ce makeContent should accept empty strings (#7764) 2022-04-21 18:57:00 +02:00
Suneet Tipirneni
29293d7bbb refactor: use arrays instead of rest parameters for builders (#7759) 2022-04-21 18:56:10 +02:00
Rodry
f22245e9d0 feat(SelectMenu): allow emojis in options and option constructors (#7797) 2022-04-21 18:55:51 +02:00
Suneet Tipirneni
585169f2f0 types: cleanup *Data type definitions (#7716) 2022-04-19 16:00:55 +02:00
Ryan Munro
ec8d87f932 feat(builders): improve embed errors and predicates (#7795)
* feat(builders): improve embed errors

* fix: use imageURLPredicates

Co-authored-by: Synbulat Biishev <arziksin@gmail.com>

Co-authored-by: Synbulat Biishev <arziksin@gmail.com>
2022-04-19 15:58:47 +02:00
n1ck_pro
440ac243ca types: fix BooleanCache never resolving to true (#7809)
* types: fix BooleanCache never resolving to true

* fix: broke other types by accident
2022-04-19 15:57:44 +02:00
Ryan Munro
c5fb548529 fix(InteractionResponses): use optional chaining on nullable property (#7812)
* fix(InteractionResponses): use optional chaining on nullable property

* fix: one more spot
2022-04-19 15:56:45 +02:00
Almeida
a6d9ce57c6 types(CommandInteraction): add awaitModalSubmit (#7811) 2022-04-19 15:56:22 +02:00
Rodry
08574763eb types(ThreadChannel): fix autoArchiveDuration types (#7816) 2022-04-19 15:54:54 +02:00
iCrawl
9ef7ffdc6d ci: use proper regex escapes 2022-04-17 20:07:19 +02:00
iCrawl
9fa92ac0f9 ci: extract package and semver from tag 2022-04-17 19:55:59 +02:00
iCrawl
2c2f88cd43 ci: change logic to parse version 2022-04-17 19:08:02 +02:00
iCrawl
93defeccce ci: move logic for replacing tag name 2022-04-17 18:49:31 +02:00
iCrawl
443533ba99 ci: fix env vars 2022-04-17 18:35:31 +02:00
iCrawl
3cc96d7940 ci: replace branch name for documentation 2022-04-17 18:31:28 +02:00
iCrawl
b94a8761f8 chore: update dev versions 2022-04-17 13:40:46 +02:00
iCrawl
9bf2a0d5cb chore: release new versions 2022-04-17 13:32:57 +02:00
iCrawl
9917981f24 chore: update ts-docgen 2022-04-17 11:53:45 +02:00
iCrawl
ab8b946276 chore: update docgen 2022-04-17 11:45:03 +02:00
iCrawl
bcf7f1cfad chore: deps 2022-04-17 11:27:36 +02:00
Suneet Tipirneni
a58556adc0 feat: allow createMessageComponentCollector without using fetchReply (#7623)
* feat: allow creation of message component collectors without fetchReply

* chore: attempt at requested changes

* fix: collector bug

* refactor: use better names

* feat: add update() support

* feat: add defer support

* refactor: InteractionReply -> InteractionResponse

* fix: remove log

* chore: make requested changes

* Update packages/discord.js/src/structures/InteractionResponse.js

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

* chore: make requested changes

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-04-17 10:59:36 +02:00
Suneet Tipirneni
40b9a1d67d feat: Slash command localization for builders (#7683)
* feat: add slash command localizations

* chore: make requested changes

* chore: make requested changes

* fix: prevent unnecessary spread

* chore: make requested changes

* chore: don't allow maps
2022-04-17 10:58:20 +02:00
MateoDeveloper
ab4c608b97 refactor(MessageAttachment): use Attachment instead (#7691)
* fix: TOKEN_INVALID error not thrown at login with invalid token

* refactor(MessageAttachment): Use Attachment instead

* Delete a mistake

* Add WebSocketManager file, deleted by error

* add a new line on WebSocketManager file

* fix: imports

* fix: conflict with typings

* chore: update reference on GuildStickerManager
2022-04-17 10:57:38 +02:00
Jiralite
1b2d8decb6 fix(MessageManager): Allow caching option of an unspecified limit (#7763)
* refactor: merge parameters

* refactor: remove default
2022-04-17 10:55:17 +02:00
Suneet Tipirneni
a674f64e1d chore: reexport all builders in discord.js (#7772)
* chore: reexport all builders in discord.js

* chore: export all builder exports

* chore: use tslib
2022-04-17 10:54:14 +02:00
Jiralite
54e5629986 refactor(Util): remove splitting (#7780) 2022-04-17 10:52:28 +02:00
Suneet Tipirneni
75b6770933 chore(builders): simplify types (#7784)
* chore(builders): simplify types

* chore: removed uneeded partial
2022-04-17 10:51:11 +02:00
muchnameless
c2866504a3 fix(builders): add constructor default param (#7788)
* fix(builders): constructor default param

* fix: another one

* fix: and another one
2022-04-17 10:50:42 +02:00
Jiralite
f1d0084da2 docs(ApplicationCommand): Fix ApplicationCommandOptionChoice (#7794) 2022-04-17 10:49:37 +02:00
Suneet Tipirneni
b01f4147d4 feat: add guild directory support (#6788) 2022-04-14 12:49:33 +02:00
Jiralite
fc2a8bb675 feat(GuildBanManager): Support pagination results (#7734) 2022-04-14 12:46:51 +02:00
Jiralite
f094e33861 types: add missing typing (#7781) 2022-04-14 12:44:42 +02:00
Jiralite
446eb390ce types(VoiceChannel): nullify property (#7793) 2022-04-14 12:43:58 +02:00
Jiralite
96a0d83a13 refactor: Tidy up builders and components (#7711) 2022-04-14 12:42:25 +02:00
Suneet Tipirneni
01a423d110 feat(CommandInteraction): add support for localized slash commands (#7684)
* feat(commandInteraction): add support for localized slash commands

* chore: make requested changes

* chore: add better localizations in docs

* refactor: use dapi types

* types: reexport LocalizationMap

* fix: add name localizations for option choices

* feat: add missing props and fetch options

* Update packages/discord.js/src/managers/ApplicationCommandManager.js

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

* chore: fix linting issues

* fix: fetching bugs

* chore: make requested changes

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-04-12 17:20:55 +02:00
Josh Wee
f0d0242c76 feat: support sodium-native lib for voice (#7698)
* chore: add sodium-native

* feat: wrap sodium-native methods

* chore: update dep listings

* chore: update dep report

* revert: "chore: add sodium-native"

This reverts commit 6a64db85d0.

* chore: consolidate buffer alloc

Co-authored-by: Vitor <milagre.vitor@gmail.com>

* chore: conslidate sodium.random

* chore: explicit param typing

* refactor: truthy style maintenance

Co-authored-by: Vitor <milagre.vitor@gmail.com>
2022-04-12 17:20:30 +02:00
muchnameless
b577bcc1df types(ModalSubmitInteraction): message (#7705) 2022-04-12 17:20:20 +02:00
Rodry
0faac04b69 feat: allow emoji strings to be passed through constructors (#7718)
* feat: allow strings to be passed through constructors

* fix: don't overwrite emoji with raw data
2022-04-12 17:19:27 +02:00
Harry Allen
9ff54254d8 fix: clarify that packages need to be locally built (#7720) 2022-04-12 17:18:43 +02:00
BaumianerNiklas
fd1dc72c0a typings(Embed): add missing getters and add video to EmbedData (#7728)
* typings(Embed): add missing author getter

* typings(Embed): add hexColor, provider, and length getters

* typings: EmbedVideoData + video fields in Embed[Data]
2022-04-12 17:18:15 +02:00
Almeida
29f8807955 feat(StageInstanceManager): add sendStartNotification option to create (#7730)
* feat(StageInstanceManager): add `sendStartNotification` option to create

* docs: update property description

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

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-04-12 17:17:49 +02:00
Vitor
6f4e97bfaf types(ModalSubmitInteraction): fix components type (#7732) 2022-04-12 17:16:36 +02:00
Vlad Frangu
3582fe917d chore: update the regex for command names/option names (#7733) 2022-04-12 17:16:08 +02:00
Jiralite
78a3afcd7f refactor: Remove nickname parsing (#7736)
* refactor: remove nickname parsing

* types: remove nickname import

* chore: update guildmember

* refactor: keep parsing

* refactor: string from user instead
2022-04-12 17:15:38 +02:00
muchnameless
3db20abdd2 fix(MessagePayload): resolveBody check body instead of data (#7738) 2022-04-12 17:15:21 +02:00
muchnameless
ebb4dfa262 fix(ActionRow): toJSON should include components (#7739)
* fix(ActionRow): toJSON should include components

* Update packages/discord.js/src/structures/ActionRow.js

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>

* types: extend component

Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: suneettipirneni <suneettipirneni@icloud.com>
2022-04-12 17:14:57 +02:00
A. Román
8eaec114a9 feat: add makeURLSearchParams utility function (#7744) 2022-04-12 17:14:30 +02:00
Jiralite
8625d81714 fix: Prevent NaN for nullable timestamps (#7750)
* fix(VoiceState): don't show `NaN`

* fix(Invite): handle NaN

* refactor: `&&` usage

Co-authored-by: Almeida <almeidx@pm.me>

Co-authored-by: Almeida <almeidx@pm.me>
2022-04-12 17:14:04 +02:00
Suneet Tipirneni
3037fca196 feat(modal): add awaitModalSubmit (#7751)
* feat(modal): add awaitModalSubmit

* fix: allow command interactions to await modal submissions

* Update packages/discord.js/src/structures/CommandInteraction.js

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>

* chore: less is more

* Update packages/discord.js/src/structures/interfaces/InteractionResponses.js

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

Co-authored-by: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-04-12 17:13:46 +02:00
Suneet Tipirneni
e4f27051ca types(interactionCollector): filter should have a collected argument (#7753) 2022-04-12 17:13:03 +02:00
Jiralite
25fdb3894d fix(InteractionCreateAction): Ensure text-based channel for caching messages (#7755)
* fix: ensure text-based channel for adding messages

* fix: account for interaction-only applications

The event will emit for these types of bots. However, as the channel is not from a cached guild, they are safe from this crash.

* fix: typos

* refactor: more descriptive variable usage
2022-04-12 17:12:31 +02:00
Jiralite
a1329bd3eb docs: Enhance /rest README (#7757)
* docs: enhance README

* chore: formatting

* docs: Fix method

Co-authored-by: Almeida <almeidx@pm.me>

* chore: remove new line

* docs: can use top-level await

* docs: fix message sending example

Co-authored-by: Almeida <almeidx@pm.me>
2022-04-12 17:11:41 +02:00
Parbez
3c0bbac82f refactor: replace zod with shapeshift (#7547) 2022-04-09 11:37:16 +02:00
Synbulat Biishev
3f3e4327c8 feat(Actions): add parent structure to events parameters (#7577) 2022-04-09 11:35:55 +02:00
Almeida
6fec25239d feat: export UnsafeModalBuilder and UnsafeTextInputBuilder (#7628) 2022-04-09 11:34:46 +02:00
Jiralite
aedddb875e refactor: Remove store channels (#7634) 2022-04-09 11:34:05 +02:00
Jiralite
402514ff32 fix: pass force correctly (#7721) 2022-04-05 12:26:21 +02:00
Jiralite
3b3dabf3da feat(VoiceChannel): Support video_quality_mode (#7722) 2022-04-05 12:26:09 +02:00
Almeida
eb6b472f72 refactor(IntegrationApplication): remove summary (#7729) 2022-04-05 12:25:52 +02:00
Suneet Tipirneni
f88e1ac4be chore: make requested changes (#7000) 2022-04-05 12:22:56 +02:00
Jiralite
905a6a1166 fix: Support reason in setRTCRegion helpers (#7723) 2022-04-04 16:32:14 +02:00
Rodry
5748dbe087 types: fix regressions (#7649)
* types: fix regressions

* fix: make requested changes

* Apply suggestions from code review

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

* types: action row data should take builders

* types: remove redundant overload

* fix(MessagePayload): ensure components are serialized correctly

* fix(MessagePayload): don't always create new action row

* refactor(UnsafeModalBuilder): make data public

* types: use type union

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

* types: fix types and add tests

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-04-04 00:19:44 +02:00
Jeroen Claassens
ac4bc3a6c8 chore(build): disable tsup minification & add "use strict"; banner to CJS bundles (#7725)
* chore(build): disable tsup minification

* chore(build): add `"use strict";` to CJS bundles
2022-03-28 21:34:58 +02:00
Jiralite
520f471ac5 docs: add back static properties and methods (#7706) 2022-03-26 13:55:53 +01:00
Jiralite
6708533376 ci: Resolve invalid semver (#7709) 2022-03-26 13:55:42 +01:00
Skick
9afc03054e types(Constants): add NonSystemMessageTypes (#7678) 2022-03-26 13:46:31 +01:00
D Trombett
74bf7d57ab fix(GuildMemberManager): return type can be null (#7680) 2022-03-26 13:45:12 +01:00
Jiralite
8e3b2d7abd types: Fix auto archive duration type (#7688)
* types: fix auto archive shenanigans

* refactor: deduplicate into utility

* types: allow `MAX` for text channels

* docs(Util): english

* fix(ThreadManager): assign on `MAX`
2022-03-26 13:43:18 +01:00
Suneet Tipirneni
8880de0cec fix(gateway): use version 10 (#7689)
* fix: make gateway use version 10

* chore: fix readme rest versions
2022-03-26 13:42:13 +01:00
Jiralite
cedd0536ba refactor(GuildAuditLogs): remove build (#7704) 2022-03-24 22:11:18 +01:00
Jiralite
85e531f22d fix: Audit log static reference (#7703)
* fix: sort into new file

* refactor: move other stuff

* fix: errors
2022-03-24 21:00:51 +01:00
muchnameless
07b23a99c7 refactor(InteractionCollector): simplify constructor logic (#7667)
* refactor(InteractionCollector): simplify constructor logic

* fix: oversight
2022-03-24 21:00:30 +01:00
Jiralite
0c32332a5a fix: handle possibly missing property (#7641) 2022-03-24 21:00:12 +01:00
Parbez
d5369a56e3 fix(util): allow escapeInlineCode to escape double backtics (#7638)
* fix(util): allow scapeInlineCode to escape double backtics

* fix: replace backtics properly

* chore: fix lint
2022-03-24 21:00:04 +01:00
Jiralite
9a6e691eaa refactor: remove undocumented checks (#7637) 2022-03-24 20:59:56 +01:00
Almeida
4d2b55955d fix(GuildEditData): some fields can be null (#7632)
* fix(GuildEditData): some fields can be null

* fix: make even more things nullable
2022-03-24 20:59:38 +01:00
MateoDeveloper
cd79bef254 fix: TOKEN_INVALID error not thrown at login with invalid token (#7630) 2022-03-24 20:59:30 +01:00
Almeida
c684ac55e1 fix(GuildScheduledEvent): handle missing image (#7625) 2022-03-24 20:59:07 +01:00
Suneet Tipirneni
fb9a9c2211 refactor: allow builders to accept emoji strings (#7616)
* refactor: allow emoji strings in button builder

* refactor: add emoji string support for select menu options

* fix: export select menu option

* chore: make requested changes

* Update packages/discord.js/typings/index.test-d.ts

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

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-03-24 20:58:50 +01:00
muchnameless
daf2829cb5 types(InteractionResponseFields): add webhook (#7597) 2022-03-24 20:58:39 +01:00
Ryan Munro
98177aa38d fix(guild): throw if ownerId falsey (#7575) 2022-03-24 20:58:29 +01:00
Suneet Tipirneni
b1d63d919a fix: Validate select menu options (#7566)
* fix: validate select menu options

* chore: make requested changes

* refactor: make requested changes

* fix: tests
2022-03-24 20:57:53 +01:00
Vlad Frangu
b520c3df3c chore(ci): fix dev deploy workflow (#7694)
* chore(ci): fix dev deploy workflow

* chore: escape the dots too, for extra future safety
2022-03-24 02:40:13 +01:00
Suneet Tipirneni
e805777a7a refactor: use static fields (#7701)
* refactor: use static fields

* chore: refactor missed areas

* chore: remove memberof docs

* chore: make type changes
2022-03-24 02:38:05 +01:00
Suneet Tipirneni
72577c4bfd feat: add API v10 support (#7477)
* feat: add API v10 support

* refactor: update deps

* chore: rebase fixes
2022-03-15 21:37:07 +01:00
Ben
9b0d8cb2d8 feat(embed): remove Embed.setColor (#7662) 2022-03-15 21:36:20 +01:00
Synbulat Biishev
8fb98165a9 types(Embed): add forgotten footer type (#7665) 2022-03-15 21:30:22 +01:00
Ben
f4729759f6 refactor(EmbedBuilder): allow hex strings in setColor (#7673)
* refactor(EmbedBuilder): allow hex strings in setColor

* Apply suggestions from code review

Co-authored-by: Almeida <almeidx@pm.me>

Co-authored-by: Almeida <almeidx@pm.me>
2022-03-15 21:29:19 +01:00
Rodry
2297c2b947 types(ColorResolvable): simplify string types (#7643) 2022-03-14 12:04:07 +01:00
Jiralite
87a6b8445b fix: Remove Modal export (#7654) 2022-03-13 15:06:41 +01:00
Suneet Tipirneni
549716e4fc refactor: Don't return builders from API data (#7584)
* refactor: don't return builders from API data

* Update packages/discord.js/src/structures/ActionRow.js

Co-authored-by: Antonio Román <kyradiscord@gmail.com>

* fix: circular dependency

* fix: circular dependency pt.2

* chore: make requested changes

* chore: bump dapi-types

* chore: convert text input

* chore: convert text input

* feat: handle cases of unknown component types better

* refactor: refactor modal to builder

* feat: add #from for easy builder conversions

* refactor: make requested changes

* chore: make requested changes

* style: fix linting error

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: almeidx <almeidx@pm.me>
2022-03-12 19:39:23 +01:00
Suneet Tipirneni
230c0c4cb1 types: allow component classes in action row data (#7614)
* types: allow component classes in action row data

* types: allow components to be passed inside objects in messages

Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2022-03-12 17:58:35 +01:00
Almeida
dcd479767b fix(SelectMenu): set placeholder max to 150 (#7538) 2022-03-10 09:00:39 +01:00
Suneet Tipirneni
3dff31f63f feat(StageInstance): Add support for associated guild event (#7576) 2022-03-10 08:57:41 +01:00
RAIDEN
cbdb408dff fix(Embed): fix incorrect destructuring import (#7615) 2022-03-10 08:55:10 +01:00
Jiralite
e787cd5fa5 docs(InteractionCollector): Document channel option type (#7551) 2022-03-09 16:18:18 +01:00
Rodry
b162f27e46 feat(VoiceState): add edit method (#7569)
Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
2022-03-07 08:53:44 +01:00
Vlad Frangu
b9ff7b0573 fix(RequestHandler): only reset tokens for authenticated 401s (#7508) 2022-03-06 20:43:12 +01:00
Jiralite
c12d61a342 fix(ThreadMembersUpdate): Only emit added & removed thread members (#7539) 2022-03-06 20:42:33 +01:00
Rodry
e71c76c7f7 types(ActionRow): allow components to be passed to constructors (#7531)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-03-06 16:27:44 +01:00
Parbez
851f380eb1 fix(Util): escapeInlineCode properly (#7587) 2022-03-06 16:27:29 +01:00
Almeida
10607dbdaf refactor: remove obsolete builder methods (#7590) 2022-03-06 16:27:17 +01:00
Suneet Tipirneni
79d6c0489c refactor(embed): allow hex strings in setColor() (#7593) 2022-03-06 16:26:41 +01:00
muchnameless
89073903a2 feat(ModalSubmitInteraction): add boolean properties (#7596) 2022-03-06 16:26:32 +01:00
Vlad Frangu
8f1986a6aa feat: add support for module: NodeNext in TS and ESM (#7598) 2022-03-06 16:26:11 +01:00
Almeida
0d7e4edd96 types(showModal): align types with the documentation (#7600) 2022-03-06 16:25:56 +01:00
muchnameless
fac55bcfd1 refactor(InteractionResponses): use ClientOptions.jsonTransformer (#7599) 2022-03-06 16:25:50 +01:00
Rodry
4b08d9b376 fix(GuildStickerManager): correctly access guild ID (#7605) 2022-03-06 16:25:01 +01:00
IRONM00N
93854a8013 types: modals type and doc fixes (#7608) 2022-03-06 16:24:43 +01:00
muchnameless
cb566c8b6a fix(MessageManager): pin route (#7610) 2022-03-06 16:24:03 +01:00
Suneet Tipirneni
6f7a366956 chore: bump turborepo (#7568) 2022-03-04 08:54:29 +01:00
Suneet Tipirneni
ed92015634 feat: Add Modals and Text Inputs (#7023)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Ryan Munro <monbrey@gmail.com>
Co-authored-by: Vitor <milagre.vitor@gmail.com>
2022-03-04 08:53:41 +01:00
muchnameless
53defb82e3 types(InteractionResponseFields): add boolean properties (#7565) 2022-03-02 10:41:56 +01:00
Parbez
8478d2f4de refactor(Embed): remove add field (#7522) 2022-03-02 10:37:30 +01:00
Suneet Tipirneni
2d4971b032 types: allow raw components for reply and message options (#7573) 2022-03-02 10:34:22 +01:00
Jiralite
c6cb5e9ebb fix: Handle partial data for Typing#user (#7542) 2022-03-02 10:30:25 +01:00
Suneet Tipirneni
a8321d8026 types: fix component *Data types (#7536) 2022-02-26 11:17:03 +01:00
Jiralite
1a14c0ca56 docs: Completely fix builders example link (#7543) 2022-02-26 11:15:52 +01:00
Jiralite
44a57a1b0c revert: chore: commit scope name in lowercase (#7550) 2022-02-26 11:14:32 +01:00
Suneet Tipirneni
0aa48516a4 fix: only check instanceof Component once (#7546) 2022-02-26 11:14:04 +01:00
Synbulat Biishev
83460037be types: use discord-api-types Locale (#7541) 2022-02-26 11:13:49 +01:00
Ben
8203c5d843 fix(guild): fix typo accessing user instead of users (#7537) 2022-02-23 22:35:25 +01:00
Khafra
51583320d3 feat(discord.js): partial transition to undici (#7482) 2022-02-23 08:40:00 +01:00
Rodry
cf669301c7 types(anychannel): add PartialGroupDMChannel (#7472) 2022-02-23 08:39:33 +01:00
Parbez
d1d1b076be fix(test): MessageActionRow to ActionRow (#7523) 2022-02-23 08:39:24 +01:00
Almeida
00728f72b3 feat(message): add reason on pin and unpin (#7520) 2022-02-23 08:38:50 +01:00
ckohen
4f306521d8 fix(MessagePayload): don't set reply flags to target flags (#7514) 2022-02-23 08:37:52 +01:00
muchnameless
6a2fa70b8e feat: re-export AuditLogEvent enum (#7528) 2022-02-23 08:36:11 +01:00
Jiralite
46b53f4365 chore: Correct gateway intent on issue form (#7532) 2022-02-23 08:33:21 +01:00
Rodry
78aa36f9f5 fix(invite): add back channelId property (#7501) 2022-02-20 13:46:15 +01:00
Skick
3baa340821 fix(builders): allow negative min/max value of number/integer option (#7484) 2022-02-20 13:43:50 +01:00
Suneet Tipirneni
ba31203a0a refactor: make data public in builders (#7486) 2022-02-20 13:43:27 +01:00
Suneet Tipirneni
8dbd34544c fix: properly serialize undefined values (#7497) 2022-02-20 13:41:50 +01:00
Suneet Tipirneni
942ea1acbf fix: allow unsafe embeds to be serialized (#7494) 2022-02-20 13:40:01 +01:00
Almeida
b3fa2ece40 refactor(embed): remove array support in favor of rest params (#7498) 2022-02-20 13:38:13 +01:00
IRONM00N
ffecf08495 docs: correctly type getters (#7500) 2022-02-20 13:36:46 +01:00
Vlad Frangu
3e105a0bbb chore: disable scope-case rule for commitlint (#7507) 2022-02-20 13:35:20 +01:00
Rodry
b12214922c refactor(components): default set boolean methods to true (#7502) 2022-02-20 13:35:00 +01:00
Jiralite
71f4fa82ed types: Remove ApplicationCommandInteractionOptionResolver (#7491) 2022-02-20 13:33:45 +01:00
Suneet Tipirneni
f7257f0765 feat: add missing v13 component methods (#7466)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-18 01:04:34 +01:00
Khafra
395a68ff49 fix: attachment types (#7478) 2022-02-17 17:45:42 +01:00
Suneet Tipirneni
dee27db35a feat(options): add support for custom JSON transformers (#7476) 2022-02-16 18:49:24 +01:00
KonkenBonken
d32db8833e docs: ApplicationCommandData typedef (#7389)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-16 14:02:50 +01:00
Rodry
5cf5071061 feat!: add CategoryChannelChildManager (#7320)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-16 14:02:12 +01:00
Suneet Tipirneni
2d4554440e fix: use case converter for json component serialization (#7464)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-02-16 14:01:41 +01:00
Rodry
7959a68d8e types(embed): fix timestamp allowed types (#7470) 2022-02-16 08:36:56 +01:00
Almeida
d2bc9d444f refactor: deprecate invite stage instance (#7437) 2022-02-16 08:35:11 +01:00
Khafra
868e2f3230 rest: prefer arrayBuffer over buffer (#7318) 2022-02-16 08:34:54 +01:00
IRONM00N
c1b27f8eed fix(GuildAuditLogs): typings and consistency (#7445) 2022-02-15 18:47:12 +01:00
nev
9311fa7b42 fix(dataresolver): ensure fetched file is convert to a buffer (#7457)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-02-15 18:36:21 +01:00
Almeida
6d3da226d3 refactor(guild): move premiumSubscriptionCount to AnonymousGuild (#7451) 2022-02-15 18:32:11 +01:00
muchnameless
a8106f7c58 fix(messagepayload): resolveFile property names (#7458) 2022-02-15 18:32:03 +01:00
muchnameless
32985109c3 refactor(requestmanager): use timestampfrom (#7459) 2022-02-15 18:31:54 +01:00
Jiralite
2d2de1d3fd types: Remove duplicate rate limit for thread creation (#7465) 2022-02-15 18:31:41 +01:00
muchnameless
d1bb36256f refactor(actions): use optional chaining (#7460) 2022-02-15 18:31:29 +01:00
muchnameless
36173590a7 fix(components): setX should take rest parameters (#7461) 2022-02-15 18:31:08 +01:00
Amitoj Singh
003439671d feat: attachment application command option type (#7200) 2022-02-14 08:41:15 +01:00
Rodry
0dfdb2cf11 refactor(guildbanmanager)!: rename days option to deleteMessageDays (#7447) 2022-02-13 16:51:56 +01:00
Amitoj Singh
ae0f35f51d feat(builders): add attachment command option type (#7203) 2022-02-13 14:02:14 +01:00
Suneet Tipirneni
0af9bc841f fix(ci): ci error (#7454)
Co-authored-by: Almeida <almeidx@pm.me>
2022-02-13 13:37:41 +01:00
Suneet Tipirneni
e8252ed3b9 refactor: make public builder props getters (#7422)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-13 13:06:11 +01:00
Sanjay Kumar Baskaran
3ae6f3c313 docs: add slash command builders example, fixes #7338 (#7339)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-13 12:42:01 +01:00
Vlad Frangu
6ce906a02f typings: correct types for InteractionCollector guild and channel (#7452) 2022-02-13 12:40:12 +01:00
Rodry
532846b1f8 refactor!: remove redundant API defaults (#7449) 2022-02-13 12:29:22 +01:00
Suneet Tipirneni
94bf727cc3 refactor: allow discord.js builders to accept camelCase (#7424) 2022-02-13 12:27:42 +01:00
Ben
f4953647ff refactor(builders-methods): make methods consistent (#7395)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-02-12 19:03:13 +01:00
PlavorSeol
861f0e2134 fix(threads): require being sendable to be unarchivable (#7406) 2022-02-12 12:09:04 +01:00
fowlerro
81d8b54ff6 fix(guildmember): check if member has administrator permission (#7384) 2022-02-12 12:08:50 +01:00
CallMe AsYouFeel
fa97a31504 voice: pass joinConfig.group to getVoiceConnection (#7442) 2022-02-12 10:22:25 +01:00
Almeida
55b388a763 fix(guild): remove maximumPresences default value (#7440) 2022-02-12 10:21:48 +01:00
Ben
fbc71ef6b6 feat(scheduledevents): add image option (#7436)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-12 10:21:28 +01:00
muchnameless
b97aedd8e1 fix(guildchannelmanager): edit always sets parent to null (#7446) 2022-02-12 10:21:06 +01:00
iCrawl
298b22604b chore: bump to the correct version 2022-02-10 17:35:20 +01:00
Almeida
fe11ff5f6e fix(guildmember): make pending nullable (#7401) 2022-02-09 09:18:50 +01:00
Rodry
dd751ae19d feat: add methods to managers (#7300)
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-09 09:18:37 +01:00
Milo
f59d6305cb feat(channel): add .url getter (#7402)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-09 09:18:30 +01:00
Suneet Tipirneni
09098240bf refactor: remove conditional autocomplete option return types (#7396)
Co-authored-by: Almeida <almeidx@pm.me>
2022-02-09 09:18:08 +01:00
Almeida
cc25455d2c refactor: replace WSCodes, WSEvents, and InviteScopes with discord-api-types equivalent (#7409) 2022-02-09 09:17:45 +01:00
Almeida
3d8c77600b types: fix GuildAuditLogsTypes keys & typos (#7423) 2022-02-09 09:16:52 +01:00
Jiralite
83458ff7c7 types: Remove duplicate GuildChannelOverwriteOptions interface (#7428) 2022-02-09 09:14:08 +01:00
Suneet Tipirneni
b936103395 fix: unsafe embed builder field normalization (#7418) 2022-02-07 11:52:10 +01:00
Tobias Peltzer
a921ec7dc5 fix(clientpresence): fix used opcodes (#7415) 2022-02-07 11:51:11 +01:00
Angga Islami
aadfbda586 fix: correctly export UnsafeSelectMenuComponent from builders (#7421) 2022-02-07 11:50:42 +01:00
Tobias Peltzer
538e9cef45 fix: use png as extension for defaultAvatarURL (#7414) 2022-02-07 11:50:09 +01:00
Parbez
f2a7a9f1b3 docs(channel): fix isDMBased docs (#7411) 2022-02-07 11:49:38 +01:00
n1ck_pro
2800e07e59 docs(messageattachment): fix contentType docs (#7413) 2022-02-07 11:49:27 +01:00
Suneet Tipirneni
d8184f94dd refactor: Make constants enums top level and PascalCase (#7379)
Co-authored-by: Vitor <milagre.vitor@gmail.com>
Co-authored-by: almeidx <almeidx@pm.me>
2022-02-05 19:56:11 +01:00
GodderE2D
cd2f566052 chore(CONTRIBUTING.md): update to yarn instructions (#7403)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-02-05 15:50:41 +01:00
Vitor
8bb3751340 docs: add supported option types for autocomplete (#7368) 2022-02-05 14:31:34 +01:00
ckohen
733ac82d5d fix(rest): sublimit all requests on unhandled routes (#7366) 2022-02-05 14:30:55 +01:00
Almeida
a7b80b9d9b types: use GuildFeature enum from discord-api-types (#7397) 2022-02-05 14:30:14 +01:00
iCrawl
5f4b44d580 chore: dev-bump all versions 2022-02-05 14:20:46 +01:00
iCrawl
c15100574b chore: fix workflows for publishing 2022-02-05 14:17:41 +01:00
iCrawl
1c186fabeb chore: fixup workflow 2022-02-04 22:29:49 +01:00
iCrawl
6faeddcd0d chore: add version plugin 2022-02-04 22:25:22 +01:00
iCrawl
87ca2854c2 chore: remove swc for now 2022-02-04 22:07:55 +01:00
iCrawl
741452b9be chore: fix publish dev workflow 2022-02-04 21:58:22 +01:00
iCrawl
37c1cb4495 chore: yarn 3 at last 2022-02-04 21:47:25 +01:00
iCrawl
cd5c7fa20e feat: expand workflows to all packages 2022-02-04 21:23:43 +01:00
Suneet Tipirneni
6b6222bf51 feat(components): Add unsafe message component builders (#7387) 2022-02-04 20:29:41 +01:00
Wilson
04502ce702 fix: messageReaction.me being false when it shouldn't (#7378) 2022-02-03 08:30:05 +01:00
Suneet Tipirneni
51beda56f7 feat(thread): add newlyCreated to threadCreate event (#7386) 2022-02-02 22:11:26 +01:00
D Trombett
92a04f4d98 fix: fix some typos (#7393) 2022-02-02 22:10:47 +01:00
Suneet Tipirneni
0b866c9fb2 docs: add external builder docs links (#7390) 2022-02-02 22:10:03 +01:00
D Trombett
4abb28c0a1 fix(builders): make type optional in constructor (#7391) 2022-02-02 21:43:27 +01:00
D Trombett
34120bba97 chore: add keepNames tsup option (#7385) 2022-02-02 15:20:16 +01:00
Jiralite
088394367b chore: Specify new root (#7382) 2022-02-02 10:55:14 +01:00
Suneet Tipirneni
0803665183 chore: bump turborepo (#7369) 2022-01-31 17:11:32 +01:00
Rodry
875c86a4ef revert: refactor(invite): make channel a getter (#7365) 2022-01-31 17:10:32 +01:00
Rodry
e6a26d25b3 types: fix *BitField.Flags properties (#7363) 2022-01-31 17:10:20 +01:00
Rodry
388f53550c feat(channel): add isDMBased typeguard (#7362) 2022-01-30 12:57:03 +01:00
Matthew1177
567db60475 feat(Interaction): add .commandType property to CommandInteraction and AutocompleteInteraction (#7357) 2022-01-30 12:56:38 +01:00
Suneet Tipirneni
fbb1d0328b refactor(Bitfield): use discord-api-types enums instead (#7313)
Co-authored-by: Almeida <almeidx@pm.me>
2022-01-28 19:14:20 +01:00
Suneet Tipirneni
74f627c379 chore: make @types/node-fetch a regular dependency (#7350) 2022-01-28 19:14:11 +01:00
Synbulat Biishev
3a5ab2c4e5 fix(messagementions): fix has method (#7292)
Co-authored-by: Almeida <almeidx@pm.me>
2022-01-28 19:13:59 +01:00
muchnameless
00ce1c56ac fix(guildmembermanager): use rest in edit (#7356) 2022-01-28 01:41:52 +01:00
Rodry
72767a1059 docs: add EnumResolvers (#7353) 2022-01-27 10:25:25 +01:00
Suneet Tipirneni
1a6c5ab145 chore: use performance.now for time-based unit tests (#7354) 2022-01-27 10:05:14 +01:00
Suneet Tipirneni
355f579771 feat(scheduledevent): add support for event cover images (#7337) 2022-01-26 21:47:47 +01:00
1Computer1
e4bd07b239 feat(Collection): add merging functions (#7299)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-01-26 21:46:31 +01:00
Casper
e1ecc1a80a fix(typings): mark RESTOptions as Partial in ClientOptions (#7349) 2022-01-26 21:45:25 +01:00
RAIDEN
11e5e5ac5b fix(Webhook): use correct method name (#7348) 2022-01-26 13:42:32 +01:00
Jan
ec0fba1ed0 refactor: use @discordjs/rest (#7298)
Co-authored-by: ckohen <chaikohen@gmail.com>
2022-01-26 10:45:04 +01:00
Suneet Tipirneni
ac26d9b130 feat(cdn): add support for scheduled event image covers (#7335) 2022-01-26 10:24:43 +01:00
Suneet Tipirneni
2db0cdd357 fix(thread): don't assign directly to getters (#7346) 2022-01-26 10:24:19 +01:00
IRONM00N
9a566e8068 feat(enumResolvers): strengthen typings (#7344) 2022-01-26 10:24:13 +01:00
Rodry
d6b56d0080 fix: don't create new instances of builders classes (#7343) 2022-01-26 10:23:58 +01:00
Rodry
b6402723c3 docs(locales): update Discord API docs link (#7266) 2022-01-25 21:23:45 +01:00
Almeida
706db9228a feat: allow setting message flags when sending (#7312) 2022-01-25 21:23:38 +01:00
IRONM00N
47633f0fd2 fix: missed enums and typings from #7290 (#7331) 2022-01-25 21:23:13 +01:00
ckohen
67250382f9 refactor(files): remove redundant file property names (#7340) 2022-01-25 15:35:04 +01:00
oof2win2
5ccdb0ab26 feat(minor): add application_id to Webhook (#7317)
Co-authored-by: Casper <53900565+Dev-CasperTheGhost@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-01-25 08:34:46 +01:00
Suneet Tipirneni
9a1623425a feat(threadchannel): add createdTimestamp field (#7306)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2022-01-25 08:34:26 +01:00
oof2win2
c05b38873b types: fix MessageMentions channel types (#7316) 2022-01-25 08:34:04 +01:00
Suneet Tipirneni
31768fcd69 refactor(embed): mark properties as readonly (#7332) 2022-01-24 20:26:36 +01:00
Rodry
bcc5cda8a9 feat(embed): add setFields (#7322) 2022-01-24 20:26:23 +01:00
Antonio Román
d2d3a80c55 refactor: switch to /builders Embed (#7067) 2022-01-24 20:17:21 +01:00
iCrawl
2f16f879aa chore: deps 2022-01-24 17:28:30 +01:00
iCrawl
a319607af6 chore(release): builders, collection, rest and voice 2022-01-24 17:14:02 +01:00
iCrawl
487a5a2669 chore: update changelogs 2022-01-24 16:42:33 +01:00
Suneet Tipirneni
c10afeadc7 types: make required a boolean (#7307) 2022-01-20 14:30:03 +01:00
ckohen
d0fa5aaa26 fix(rest): don't add empty query (#7308) 2022-01-20 12:14:31 +01:00
ckohen
d8ea572fb8 fix(rest): use http agent when protocol is not https (#7309) 2022-01-20 12:14:12 +01:00
Jiralite
1c6c9449ad types: Fix channel create overloads (#7294) 2022-01-19 22:06:07 +01:00
Jan
b4ed8fd3ed refactor: remove transformPermissions (#7303) 2022-01-19 22:05:54 +01:00
Suneet Tipirneni
857bba4480 fix(guildchannelmanager): remove reverse enum lookup (#7304) 2022-01-19 22:05:38 +01:00
Shubham Parihar
bd33ebb507 docs(StageInstance): deprecate discoverableDisabled (#7179) 2022-01-19 20:37:05 +01:00
Jiralite
cf25de9373 feat(GuildPreview): Add stickers (#7152) 2022-01-19 20:36:05 +01:00
SpaceEEC
5b4dbc3359 ci(publish-dev): only build dependencies when releasing (#7302) 2022-01-19 14:54:25 +01:00
Suneet Tipirneni
213acd7997 feat: Enum resolvers & internal enum string removal (#7290)
Co-authored-by: Almeida <almeidx@pm.me>
2022-01-19 14:11:10 +01:00
Jiralite
164589c551 refactor: Remove VoiceChannel#editable (#7291) 2022-01-19 07:14:33 +01:00
Jiralite
347ff80bbc refactor: Remove boolean option for Webhook#fetchMessage (#7293) 2022-01-19 07:13:38 +01:00
Khafra
307389a335 BaseClient: pass captureRejections option (#7288) 2022-01-18 11:21:05 +01:00
awned
9181a31e0b feat(guildemojimanager): add delete and edit methods (#7286)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-01-18 08:35:36 +01:00
Almeida
86d9d06743 fix(builders): dont export Button component stuff twice (#7289) 2022-01-17 22:13:51 +01:00
Suneet Tipirneni
da05a8856b feat(interaction): add isRepliable type guard (#7259)
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2022-01-17 20:17:34 +01:00
Parbez
6112767128 refactor(subcommandgroup): required default to false (#7217) 2022-01-17 16:46:31 +01:00
Rodry
26a9dc3206 types: fix regressions and inconsistencies (#7260) 2022-01-17 16:45:23 +01:00
Almeida
18b0ed4cbe refactor(invite): make channel and inviter getters (#7278) 2022-01-17 13:51:34 +01:00
Parbez
c90e47f904 refactor: remove required from getMember (#7188) 2022-01-17 13:51:13 +01:00
Suneet Tipirneni
3bb4829800 feat: rest hash and handler sweeping (#7255)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-01-17 13:50:41 +01:00
Almeida
e65da44d9c docs(shardingmanager): fix type of execArgv option (#7284) 2022-01-17 13:15:46 +01:00
Suneet Tipirneni
0951309b32 chore(cdn): default to animated images (#7265)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2022-01-17 13:14:03 +01:00
Suneet Tipirneni
101d7c5ffa refactor: remove djs components and use /builders components instead (#7252)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-01-17 13:13:48 +01:00
Jan
599f96740e ci: fix docs workflow (#7287) 2022-01-17 11:40:53 +01:00
Jan
9054f2f7ad feat: rest docs (#7281) 2022-01-17 10:56:48 +01:00
Almeida
ecf2430f6e ci: dont run auto-deprecated and publish-dev on forks (#7279) 2022-01-16 21:24:31 +01:00
Jiralite
7c07976018 refactor: Default *URL methods to animated hash (#7149)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2022-01-14 18:03:09 +01:00
Antonio Román
8ddd44ed85 fix: import clear{Timeout,Interval} from node:timers (#7269) 2022-01-14 13:34:59 +01:00
Jan
0b23b7f039 refactor: use setPosition inside edit (#7263) 2022-01-14 00:21:32 +01:00
Koyamie
06f5210f58 fix(ApplicationCommand): use new ApplicationCommandOptionType enums (#7257) 2022-01-14 00:20:45 +01:00
Almeida
f284a4641f fix: use enums from discord-api-types (#7258) 2022-01-14 00:19:35 +01:00
Rodry
37ec0bda6d docs(interaction): add locale list link (#7261) 2022-01-13 18:19:30 +01:00
Jan
0a5d5f38c0 refactor: don't disable import order lint (#7262) 2022-01-13 17:59:49 +01:00
Vitor
0dd56afe1c docs: fix a typo and use milliseconds instead of ms (#7251) 2022-01-13 17:59:28 +01:00
Jiralite
7b53978a73 chore: Add prefer-object-has-own rule (#7264) 2022-01-13 17:59:10 +01:00
Suneet Tipirneni
2bb40fd767 feat: add components to /builders (#7195)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2022-01-12 20:50:08 +01:00
Rodry
37a22e04c2 feat(Channel): improve typeguards (#6957)
Co-authored-by: Papageorgiadis Savvas <50584606+papsavas@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2022-01-12 20:30:06 +01:00
Koyamie
f753882592 fix(exports): export ApplicationCommandType properly (#7256) 2022-01-12 20:27:41 +01:00
Suneet Tipirneni
aa6d1c74de refactor: remove discord.js enums and use discord-api-types enums instead (#7077) 2022-01-12 02:00:41 +01:00
Jan
1479e40bce refactor(application): remove fetchAssets (#7250) 2022-01-11 22:03:17 +01:00
Voxelli
1745973024 refactor: PresenceUpdate and demuxProbe (#7248) 2022-01-11 22:02:54 +01:00
iCrawl
62c74b8333 test(voice): fix tests 2022-01-11 21:53:08 +01:00
Suneet Tipirneni
db25f529b2 types: add ReadonlyCollection (#7245)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2022-01-11 12:30:16 +01:00
Noel
16938da355 chore: improve linting (#7244) 2022-01-11 12:30:08 +01:00
Voxelli
ff3a8b8323 fix(Shard): EventEmitter listener warning (#7240)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2022-01-11 12:30:00 +01:00
ckohen
86ab526d49 refactor(files): file data can be much more than buffer (#7238) 2022-01-11 12:29:48 +01:00
Suneet Tipirneni
d8efba24e0 refactor: make intersect perform a true intersection (#7211)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-01-11 12:29:41 +01:00
Suneet Tipirneni
9052e321d1 feat: Add Locales to Interactions (#7131)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2022-01-11 08:55:49 +01:00
Parbez
22fdbb0a29 chore: commit scope name in lowercase (#7246) 2022-01-11 08:53:26 +01:00
Suneet Tipirneni
ed0cfd91ed fix: ref delay for rate limited requests (#7239) 2022-01-10 10:21:44 +01:00
Noel
b2dfb2ec70 revert "chore: optimize Turbo pipelines" (#7237) 2022-01-09 23:22:25 +01:00
iCrawl
56b69a749a ci: only run assignment when a pr opens 2022-01-09 22:44:06 +01:00
Jonah Snider
fae39efc7f chore: optimize Turbo pipelines (#7236) 2022-01-09 22:32:02 +01:00
iCrawl
7ddd337c4a ci: more automation for prs 2022-01-09 22:30:52 +01:00
Rodry
a8509c91ca fix(timestamps): account for timestamps of 0 when creating Dates (#7226) 2022-01-09 21:48:45 +01:00
Jonah Snider
a0a4a2258a chore: format all supported Prettier files (#7233) 2022-01-09 21:42:04 +01:00
Almeida
4770c814b2 chore: update readme links (#7229) 2022-01-09 19:35:18 +01:00
iCrawl
4917eb3539 ci: revert auto-labeling 2022-01-09 19:28:32 +01:00
iCrawl
c0824ae419 ci: try different syntax in yaml file 2022-01-09 19:23:33 +01:00
iCrawl
174782e132 ci: update version of labeler 2022-01-09 19:15:21 +01:00
iCrawl
538d6683bc ci: escape backslashes in yml 2022-01-09 18:57:19 +01:00
iCrawl
0236308581 ci: better labeler for issues and prs 2022-01-09 18:33:27 +01:00
Rodry
822dc678da refactor(embeds): don't create new embed instances when unnecessary (#7227) 2022-01-09 17:35:32 +01:00
Suneet Tipirneni
f1d4bd68ec chore: allow typescript to typecheck .d.ts files (#7222) 2022-01-09 15:14:29 +01:00
Hyro
e38d79988a chore: license for REST module (#7223) 2022-01-09 13:21:43 +01:00
Vitor
bd7a6f2652 docs(SlashCommandSubcommands): updating old links from Discord developer portal (#7224) 2022-01-09 13:20:43 +01:00
Raiden-Ei
37cad54dbd fix(MessageEmbed): createdAt field can be zero (#7218) 2022-01-09 13:20:07 +01:00
Rodry
4fd127e79e refactor(GuildMember): throw better errors on #kickable and #bannable (#7137) 2022-01-09 13:18:50 +01:00
J-Human
ab3ff5a262 feat(Permissions): remove deprecated thread-related permissions (#6755) 2022-01-09 11:49:27 +01:00
J-Human
b92a7d7233 fix(BaseClient): do not append default options if provided is not an object (#6453) 2022-01-09 11:49:03 +01:00
J-Human
caaef53dd9 feat(VoiceRegion): remove the unsent vip field (#6759) 2022-01-09 11:48:15 +01:00
muchnameless
68b9564f18 types(interaction): remove renamed typeguards (#7220) 2022-01-09 11:44:24 +01:00
muchnameless
962f4bf882 fix: snowflakeutil import (#7219) 2022-01-09 11:43:35 +01:00
iCrawl
e07c374337 ci: fix publishing dev versions 2022-01-08 23:30:28 +01:00
iCrawl
7832dbc07a chore: yarn lock 2022-01-08 23:17:01 +01:00
iCrawl
4a2dbd6238 test: fix voice secretbox tests 2022-01-08 23:16:38 +01:00
iCrawl
b593bd32a9 test: fix voice tests 2022-01-08 22:57:29 +01:00
iCrawl
1d532d9468 ci: don't cache deps for publish 2022-01-08 22:53:10 +01:00
iCrawl
3f36746561 types: assertType -> expectType 2022-01-08 20:52:11 +01:00
Antonio Román
e082dfb158 refactor(SnowflakeUtil): switch to @sapphire/snowflake (#7079) 2022-01-08 19:11:33 +01:00
Matt (IPv4) Cowley
ae876d9624 refactor(InteractionCreate): remove interaction event (#6326) 2022-01-08 14:43:30 +01:00
Matt (IPv4) Cowley
171e917fb9 refactor(MessageCreate): remove message event (#6324) 2022-01-08 14:43:12 +01:00
Koyamie
63034b44c9 fix(Role): remove unused process (#7215) 2022-01-08 14:10:56 +01:00
Rodry
13eb78256d refactor(integration): turn undefined into null and consistency (#7209) 2022-01-08 12:44:28 +01:00
IlluminatiFish
1c615d1bb2 fix(WebhookClient): Updated webhook url regex (#6804) 2022-01-08 12:42:50 +01:00
Suneet Tipirneni
1db6c2d37e chore(ThreadMemberManager): make #fetch only take one object parameter (#6997) 2022-01-08 12:42:30 +01:00
Antonio Román
cee7fd181c refactor: remove deleted field (#7092) 2022-01-08 12:41:35 +01:00
Jan
55e21f5366 refactor(Dates): save timestamps everywhere and use Date.parse (#7108) 2022-01-08 12:41:20 +01:00
Commandtechno
d06d70ccf2 feat(richpresenceassets): add YouTube and custom image support (#7184) 2022-01-08 12:40:35 +01:00
Koyamie
95f8375d42 fix(Sweepers): add sweepStickers function (#7213) 2022-01-08 12:39:48 +01:00
Suneet Tipirneni
137ea249df docs: fix command interaction docs (#7212) 2022-01-08 11:21:06 +01:00
Koyamie
49dada35f9 fix(InteractionCreate): use ChatInputCommandInteraction instead (#7210) 2022-01-08 02:31:23 +01:00
iCrawl
53971f0de9 ci: use yarn to create new version 2022-01-08 01:47:00 +01:00
iCrawl
9760fd1b77 ci: fix publishing dev version 2022-01-08 01:44:17 +01:00
Raiden-Ei
fbef454894 fix(Structues): rename old module's name (#7207) 2022-01-08 01:41:22 +01:00
Jiralite
fbbac27978 refactor(RoleManager): Remove comparePositions() (#7201) 2022-01-08 01:35:32 +01:00
Rodry
dbf5ce3e6c ci(documentation): add repository_owner check (#7205) 2022-01-08 01:35:20 +01:00
Antonio Román
ef6f035b5d chore: add myself to contributors (#7206) 2022-01-08 01:35:07 +01:00
iCrawl
9d17904eff chore: deps 2022-01-08 01:33:47 +01:00
Raiden-Ei
033151cf92 fix(WebSocket): Remove application command handler (#7202) 2022-01-08 01:29:56 +01:00
Rodry
3269ec1984 chore(VSCode): add extension recommendations (#6666) 2022-01-08 00:51:19 +01:00
ckohen
c969cbf652 refactor(rest): rename attachment to file (#7199) 2022-01-08 00:49:34 +01:00
Suneet Tipirneni
3872acfeb8 fix(User): bannerURL() should not throw when not present (#6789) 2022-01-08 00:48:46 +01:00
ckohen
12ffa069aa chore(Caching): clean up deprecated cache sweeping (#7118)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2022-01-08 00:48:17 +01:00
Suneet Tipirneni
1f9b9225f2 types(Collection): union types on intersect and difference (#7196) 2022-01-08 00:47:55 +01:00
Suneet Tipirneni
b7856e7809 refactor: Better Command Terminology (#7197) 2022-01-08 00:47:41 +01:00
Jan
5022b14da0 refactor(Actions): remove deleted maps (#7076) 2022-01-08 00:34:47 +01:00
iCrawl
fbe40031cf chore: manually update changelog 2022-01-08 00:03:51 +01:00
Jiralite
a0d5f13dd9 fix(VoiceState): Ensure suppress & streaming have proper fallback values (#6377) 2022-01-07 23:40:58 +01:00
Rodry
6085b4f727 refactor(Client): remove applicationCommand events (#6492) 2022-01-07 23:40:50 +01:00
Jiralite
0c24cc8ec0 refactor: Remove Util.removeMentions() (#6530) 2022-01-07 23:40:36 +01:00
Rodry
75616a305f refactor(Constants): change APPLICATION_COMMAND -> CHAT_INPUT_COMMAND (#7018) 2022-01-07 23:40:01 +01:00
Antonio Román
2b480cb14e feat(Collector): yield all collected values (#7073) 2022-01-07 23:39:49 +01:00
LePtitMetalleux
b454740ae8 docs(TextBasedChannel): fixed syntax error in examples (#7163) 2022-01-07 23:38:58 +01:00
Suneet Tipirneni
c978dbb623 types: fix cache types resolving to never (#7164) 2022-01-07 23:37:17 +01:00
n1ck_pro
d4e6e03708 docs(TextBasedChannel): fix #createMessageComponentCollector description (#7168) 2022-01-07 23:18:46 +01:00
GoldenAngel
db669b8971 docs: fixes the examples for kick and ban (#7170) 2022-01-07 23:18:25 +01:00
awned
f79ea67d3a docs(RoleManager): fix incorrect example (#7174) 2022-01-07 23:17:57 +01:00
ckohen
ae2f013653 fix(sweepers): provide default for object param (#7182) 2022-01-07 23:16:00 +01:00
Souji
37587e2bcb chore: issue template changes for monorepo (#7198) 2022-01-07 23:13:04 +01:00
Almeida
43e5e3c339 refactor(Guild): remove deprecated setXPositions methods (#6897) 2022-01-07 23:12:31 +01:00
Almeida
b246fc4101 refactor(UserFlags): update flag names (#6938) 2022-01-07 23:12:05 +01:00
Antonio Román
4293b74253 chore: bump Node.js to 16.9.0 (#7035) 2022-01-07 21:03:00 +01:00
iCrawl
c8bfb24589 ci: use pull_request_target for auto labeling 2022-01-07 20:54:51 +01:00
iCrawl
b08c41d425 chore: remove labeling chore for now 2022-01-07 20:49:47 +01:00
iCrawl
4a80710e7a chore: add auto-labeler 2022-01-07 20:42:43 +01:00
iCrawl
1060dcdd4e chore: add more labels 2022-01-07 20:17:48 +01:00
iCrawl
967e9ace21 ci: max simultaneous of 1 for documentation runners 2022-01-07 17:27:26 +01:00
iCrawl
3c9a9c2c18 ci: force push to avoid non-fast-forward errors 2022-01-07 17:23:13 +01:00
Noel
16390efe6e chore: monorepo setup (#7175) 2022-01-07 17:18:25 +01:00
Attituding
780b7ed39f docs(Sweepers): fix typo (#7165) 2021-12-30 10:13:51 +01:00
iCrawl
9cdc4482a0 chore: dev version 2021-12-29 12:08:52 +01:00
iCrawl
2f6f365098 chore(release): version 2021-12-29 12:00:43 +01:00
iCrawl
22cadaf40f chore: deps 2021-12-29 11:19:20 +01:00
Jiralite
3496516dc9 refactor(MessageEmbed): Deprecate strings for setAuthor() (completely) and setFooter() (#7153) 2021-12-29 11:04:16 +01:00
Shubham Parihar
baacd6ba69 feat(GuildMember): add method to check timeout (#7146)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-12-29 10:52:15 +01:00
Suneet Tipirneni
1391c363e5 chore: bump dapi-types (#7159) 2021-12-29 00:34:14 +01:00
iCrawl
4cc6331e5c chore: fixup commits in changelog 2021-12-28 12:36:06 +01:00
iCrawl
1ae1853788 chore: fixup changelog generation 2021-12-28 12:17:23 +01:00
iCrawl
d80fddf06d chore: better changelog generation 2021-12-28 12:13:38 +01:00
Antonio Román
3c62bd2d47 refactor: import timers, process, and Buffer from node: (#7157)
Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2021-12-28 10:15:24 +01:00
muchnameless
d0c3961aef fix(GuildMemberManager): nick endpoint (#7151) 2021-12-26 18:52:48 +01:00
D Trombett
fc4292e2e9 fix(Permissions): toArray shouldn't check admin (#7144) 2021-12-26 15:46:35 +01:00
Jiralite
7e5f16b6b3 fix: Remove deprecation warning on Message#cleanContent (#7143) 2021-12-26 15:46:28 +01:00
Superchupu
f1d35e32ee ci: use correct capitalization of npm (#7150) 2021-12-26 12:57:24 +01:00
Kyler Chin
2bfc638a5c feat(ClientOptions): waitGuildTimeout amount client option (#6576)
Co-authored-by: D Trombett <73136330+DTrombett@users.noreply.github.com>
Co-authored-by: Hackerboi 69 <62872992+thehackerboi69github@users.noreply.github.com>
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Yoshida Tomio <mail@tomio.codes>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-12-24 14:30:00 +01:00
iCrawl
ea9e897b92 chore: bump version 2021-12-24 12:26:51 +01:00
iCrawl
bf346e7fdf chore: release 2021-12-24 12:25:12 +01:00
iCrawl
391211040a chore: deps 2021-12-24 12:21:53 +01:00
Rodry
1626dded5b types(CategoryChannel): fix createChannel return type (#7138) 2021-12-24 11:58:50 +01:00
Rodry
e6f41b578a fix(BaseMessageComponent): don't create new class instances (#7140) 2021-12-24 11:58:37 +01:00
Shubham Parihar
1316fd4c6a feat: add support for GuildScheduledEvent (#6493)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-12-23 13:39:09 +01:00
Jiralite
aa7c1b2081 feat(GuildMember): Add timeouts (#7104)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-12-22 17:54:44 +01:00
Jiralite
2ed02f7fc7 refactor(UserManager): Move methods to the manager (#7087)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-12-22 14:25:52 +01:00
Suneet Tipirneni
a0a5b0e4fa types(CategoryChannel): createChannel should default to a text channel (#7132) 2021-12-22 14:00:07 +01:00
RaZe
b763dabaa9 fix: Make the followUp function error more clear (#7129)
Co-authored-by: D Trombett <maxtromb.dt@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-12-22 11:13:34 +01:00
Antonio Román
7b65a04cb1 types: make channel types a lot stricter (#7120) 2021-12-22 11:13:01 +01:00
Jiralite
6bb03f2c34 fix(StickerPack): Nullify bannerId (#7119) 2021-12-21 09:16:30 +01:00
Suneet Tipirneni
645b3f84f4 fix: webhook typeguards should use string comparisons (#7127) 2021-12-21 09:16:11 +01:00
Suneet Tipirneni
77489b90fc types: forward cache types to collector filters (#7126) 2021-12-21 09:16:02 +01:00
muchnameless
b9b60a37b3 feat: export Sweepers (#7117) 2021-12-16 10:06:37 +01:00
Jiralite
55960cc778 feat: Add API error code 50109 (#7112) 2021-12-16 10:04:03 +01:00
Jiralite
8efc5c7b8d chore(GuildMemberManager): Update nick path (#7114) 2021-12-15 20:43:12 +01:00
ckohen
d1ef2f5e8b feat(Client): add global sweepers (#6825)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2021-12-15 13:39:27 +01:00
Jiralite
bc6a6c539f types: Fix possibly null message properties (#7111) 2021-12-15 13:39:05 +01:00
Antonio Román
a0fe0acbf1 fix(Message): remove usage of .deleted (#7109) 2021-12-14 21:10:14 +01:00
Antonio Román
d43f68488e docs: deprecate .deleted getters (#7107) 2021-12-14 19:34:27 +01:00
Jiralite
1e00fc2001 refactor(RoleManager): Move some methods over from Role (#7096) 2021-12-14 19:04:07 +01:00
Suneet Tipirneni
49f9a18020 types: use mapped enums instead of overloads (#7088) 2021-12-14 19:03:39 +01:00
Jiralite
9cf44d1c0e fix(GuildAuditLog): Remove Promises in constructor (#7089) 2021-12-14 19:03:21 +01:00
Jiralite
2ce244b502 types(MessageComponentInteraction): Ensure component is not null (#7099) 2021-12-12 22:06:24 +01:00
Jan
717e0e963f refactor(Guild): remove duplicate methods (#7100) 2021-12-12 22:06:11 +01:00
Jiralite
ee91f5a19c docs(Sticker): Fix typo (#7085) 2021-12-10 10:09:45 +01:00
Jiralite
5a5c045534 types(GuildAuditLog): Strengthen types (#7090) 2021-12-10 10:07:57 +01:00
Antonio Román
de61fe4854 fix(ShardingManager): fix respawnAll not passing delay correctly (#7084) 2021-12-10 10:07:35 +01:00
Jiralite
6e57b65e99 docs(Constants): Document missing errors (#7086) 2021-12-08 23:50:04 +01:00
Antonio Román
25b8491235 refactor(Util): replace Util.delayFor with tp.setTimeout (#7082) 2021-12-08 21:31:01 +01:00
Jiralite
23513d1917 docs(Constants): Adjust GUILD_STORE warning placement (#7083) 2021-12-08 21:30:40 +01:00
Rodry
fdba146f9b docs(StoreChannel): add deprecation warnings (#7080)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-12-08 18:51:07 +01:00
iCrawl
4515bb1ab2 chore: deps 2021-12-08 10:53:37 +01:00
Suneet Tipirneni
1230bee9bc types(Message): guild should be non-null when message is in guild (#6933) 2021-12-08 10:49:17 +01:00
Antonio Román
b0937502d3 refactor: make Structure#deleted a getter to a WeakSet (#7074) 2021-12-08 10:47:54 +01:00
Shubham Parihar
f410536c51 feat: add API error code 20029 (#7078) 2021-12-08 10:40:49 +01:00
SethCohen
6f58e8122d docs(GuildStickerManager): fix create() example (#7060) 2021-12-07 20:15:24 +01:00
Antonio Román
5ec542d61f fix(StoreChannel): mark as deprecated (#7072) 2021-12-07 20:15:04 +01:00
Rodry
7f980e38b6 feat(ApplicationCommand): add setX methods for easier editing (#7063)
Co-authored-by: awned <65061212+ceilingfans@users.noreply.github.com>
2021-12-07 20:14:49 +01:00
Antonio Román
b5cd2884b6 fix(InteractionCollector): handle thread (and parent) deletion (#7070) 2021-12-07 11:21:26 +01:00
Jiralite
f028aea333 feat: Add API error code 50055 (#7068) 2021-12-07 11:19:45 +01:00
Antonio Román
3846f0d97c fix(ReactionCollector): check for channel.threads (#7069) 2021-12-07 11:19:36 +01:00
Elliot
b6b4570482 types: improve audit logs' typings (#6647)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
2021-12-06 08:57:12 +01:00
Antonio Román
8b200c0fee feat(SnowflakeUtil): add timestampFrom (#7058) 2021-12-06 08:56:29 +01:00
GodderE2D
1c93faa3ab chore: format .github/tsc.json (#7062) 2021-12-06 08:55:16 +01:00
Jiralite
01f8d1bed5 types(Interaction): Narrow memberPermissions (#7054) 2021-12-02 14:29:54 +01:00
That_Guy977
5fcda73d9f fix(GuildChannel): default to this.rawPosition in clone() (#7057) 2021-12-02 14:29:21 +01:00
Rodry
552d89fd4e feat(Guild): add premiumProgressbarEnabled (#6887)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-12-01 12:40:49 +01:00
Rodry
b183a8eece docs(Invite): add info blocks for missing props (#7014) 2021-12-01 12:33:28 +01:00
Suneet Tipirneni
da86bd4fa3 fix: Interaction channel type should be GuildTextBasedChannels when in guild (#6998) 2021-12-01 12:33:11 +01:00
That_Guy977
c07207f219 fix(Util): fix sorting for GuildChannels (#7002) 2021-12-01 12:32:13 +01:00
GrapeColor
4fe063f0d0 feat: add UserContextMenuInteraction and MessageContextMenuInteraction (#7003)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
2021-12-01 12:31:37 +01:00
Suneet Tipirneni
a39d8c4d9d Revert "types(ApplicationCommandManager): Deprecate old *Data type …usages and allow camel cased dapi types to be used (#7052) 2021-12-01 12:28:22 +01:00
Jiralite
85e6812ce2 docs(MessageReference): Fix static link (#7041) 2021-12-01 12:27:24 +01:00
Suneet Tipirneni
e305156769 chore: bump deps (#7048) 2021-11-29 19:32:26 +01:00
Antonio Román
374f970efe chore: add myself as contributor in package.json (#7037) 2021-11-29 11:20:52 +01:00
Antonio Román
e59fac3fe3 refactor(SnowflakeUtil): clean up utils and improve perf (#7036) 2021-11-29 11:20:18 +01:00
Antonio Román
fd63139b41 fix(MessageManager): do not use client.emojis (#7039) 2021-11-29 11:19:32 +01:00
Antonio Román
0193efae71 fix(ActionsManager): revert to manual requires (#7034) 2021-11-29 11:19:21 +01:00
Antonio Román
fabd34381c fix(MessagePayload): prevent spread of undefined (#7029) 2021-11-29 11:18:41 +01:00
Suneet Tipirneni
2c91c488e8 types(ApplicationCommandManager): Deprecate old *Data type usages and allow camel cased dapi types to be used (#6959) 2021-11-29 11:17:57 +01:00
Jiralite
54f937d82c fix(MessageManager): Allow a string for edit() (#7033) 2021-11-25 12:42:11 +01:00
Suneet Tipirneni
9f3bf2927c CI: Use tsd for Testing Types (#6983)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-11-23 18:00:58 +01:00
Jiralite
2a0dedf3e9 chore: Emit deprecation messages (#6994) 2021-11-23 10:29:45 +01:00
SpaceEEC
7efeff461f fix: avoid sending bot auth on token endpoints (#7022) 2021-11-23 10:28:09 +01:00
Rodry
099536ee60 types(WebhookMessageOptions): disallow stickers (#7012) 2021-11-23 10:27:03 +01:00
dai
77aff08345 feat(Shard): add eval context (#7011)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-11-23 10:26:46 +01:00
Suneet Tipirneni
c1f2fe29ef types: remove unneeded collector types (#7008) 2021-11-23 10:26:18 +01:00
GodderE2D
a1a8ca4814 docs(Constants): fix typo "announcement" (#7016) 2021-11-23 10:24:14 +01:00
Suneet Tipirneni
48555cb8eb types: make event emitters use mapped event types (#7019) 2021-11-23 10:23:14 +01:00
Suneet Tipirneni
802a5ac228 chore: collector type cleanup (#6991) 2021-11-18 07:58:17 +01:00
Suneet Tipirneni
db09d79423 feat(ThreadChannel): add ThreadChannel#viewable (#6975) 2021-11-18 07:58:05 +01:00
Suneet Tipirneni
0c5c7210e7 chore: bump typescript to 4.5 (#6999) 2021-11-18 07:55:19 +01:00
Suneet Tipirneni
493e4f9350 feat(ThreadManager): add slowmode option on thread creation (#6989)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-11-17 22:47:50 +01:00
SpaceEEC
c0ba2d46d0 fix(Sharding): properly handle errors in fetchClientValues (#6990) 2021-11-16 18:40:45 +01:00
SpaceEEC
fdb09cbe03 fix(VoiceState): set streaming to false when the stream ended (#6992) 2021-11-16 18:40:19 +01:00
Suneet Tipirneni
ecc61f3c74 types(ApplicationSubcommandData): allow autocomplete to be true (#6981) 2021-11-16 18:32:25 +01:00
Hackerboi 69
06cd16fe97 types: fix interaction typeguards (#6976) 2021-11-16 18:32:16 +01:00
Jiralite
73854ee852 refactor(MessageEmbed): Utilise an object approach for .setAuthor() (#6966)
Co-authored-by: Almeida <almeidx@pm.me>
2021-11-16 18:31:08 +01:00
Jake Ward
5e0a7d51fc feat(MessageAttachment): description (alt text) support (#6871)
Co-authored-by: D Trombett <maxtromb.dt@gmail.com>
2021-11-11 20:29:17 +01:00
Suneet Tipirneni
7630158f59 types: Strengthen autocomplete option types (#6950)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-11-11 19:38:34 +01:00
Suneet Tipirneni
9f240ea0d1 types: fix cache type fallback types (#6961) 2021-11-11 19:37:53 +01:00
GrapeColor
b001e194f1 fix(MessageReaction): Cache myself when MessageReaction#me is true. (#6956)
Co-authored-by: GrapeColor <grapecolor@users.noreply.github.com>
2021-11-11 19:21:45 +01:00
Vlad Frangu
8e881d2b96 types: unify ApplicationCommandManager#create overloads (#6970) 2021-11-11 19:08:28 +01:00
ckohen
c30a818ca9 feat(ApplicationCommand): add support for min and max values (#6855)
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
2021-11-11 19:07:21 +01:00
GodderE2D
3c857a6363 docs(README): add installation instruction on @discordjs/voice (#6964) 2021-11-11 03:31:09 +01:00
iCrawl
b256ae1fa6 chore: open collective funding 2021-11-09 18:51:43 +01:00
Almeida
49e3ce2133 feat(SystemChannelFlags): add new flag (#6870)
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
2021-11-06 01:00:18 +01:00
ckohen
c297829d54 types(Events): rest events can be emitted on BaseClient (#6936) 2021-11-06 00:58:54 +01:00
すずねーう
dc6454104f docs(Guild): fix setOwner() example (#6929)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-11-05 10:32:49 +01:00
Jiralite
28688e27d5 refactor: Deprecate application command events (#6937) 2021-11-02 14:43:30 +01:00
Tiemen
f43140abac feature(UserFlags): add BOT_HTTP_INTERACTIONS (#6733) 2021-11-01 18:50:42 +01:00
Almeida
47d74ebf81 feat: add new activity flags (#6699) 2021-11-01 18:50:36 +01:00
Advaith
e94073a6ab feat(ApplicationFlags): add message content intent flags (#6888) 2021-11-01 18:50:23 +01:00
iCrawl
076524a064 chore: dev version 2021-11-01 18:48:21 +01:00
iCrawl
5ec04e077b chore(Release): version 13.3.1 2021-11-01 18:46:16 +01:00
SpaceEEC
9bd3689fb1 fix: assert channel types in message actions (#6919) 2021-11-01 18:40:19 +01:00
Rodry
95d2a4d35e fix(MessageEmbed): only compare image urls in #equals (#6926) 2021-11-01 18:36:41 +01:00
Superchupu
bb245b7b35 docs(README): use correct capitalization of npm (#6930) 2021-11-01 18:36:26 +01:00
Rodry
204aee799a types: improve toJSON methods for message components & embeds (#6925) 2021-11-01 15:09:00 +01:00
Rodry
2d9ffb8c5b fix: correctly access guild IDs inside managers (#6927) 2021-11-01 15:07:55 +01:00
Indian Ocean Roleplay
b6484ac117 ci: validate typings (#6913) 2021-11-01 15:07:27 +01:00
Indian Ocean Roleplay
761a901885 chore: next dev version (#6920) 2021-10-29 22:11:00 +02:00
iCrawl
0238da45c5 chore(Release): publish 2021-10-29 20:10:45 +02:00
iCrawl
27fb5e5c6b chore: repo changes 2021-10-29 19:53:54 +02:00
Indian Ocean Roleplay
673c03f7cf types(fix): BaseCommandInteractionOptionResolver and CommandInteraction (#6910) 2021-10-29 19:38:21 +02:00
Jiralite
d6685b1c50 fix: Handle message bulk delete and thread delete in collectors (#6902) 2021-10-29 14:58:31 +02:00
Suneet Tipirneni
14716df6b6 feat(ThreadMemberManager): allow individual members to be fetched (#6889)
Co-authored-by: ckohen <chaikohen@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-10-29 14:57:53 +02:00
Jiralite
aa4d05504f docs(Constants): Document missing autocomplete interaction constants (#6916) 2021-10-29 14:57:35 +02:00
Almeida
7be9170659 types(Constants): remove deleted properties from Package (#6908) 2021-10-29 14:57:12 +02:00
Jiralite
5d987ee56e docs(InteractionCollector): Add info block about being prone to always running (#6906) 2021-10-29 01:39:24 +02:00
Indian Ocean Roleplay
49e686a721 ci: release dev version only if required (#6879) 2021-10-29 01:24:04 +02:00
Micah Benac
ddf759c811 feat: add support for autocomplete interactions (#6672)
Co-authored-by: Suneet Tipirneni <suneettipirneni@icloud.com>
2021-10-29 00:47:50 +02:00
SpaceEEC
14d9a9901b types(Shard): eval returns a promise resolving with T instead of T[] (#6901) 2021-10-29 00:47:18 +02:00
Vlad Frangu
ee93a27e15 types(ApplicationCommandManager): add missing overload for fetch (#6904) 2021-10-28 16:19:19 +02:00
Suneet Tipirneni
91a432e49d types(TextBasedChannel): text channel interaction collectors should have message option (#6903) 2021-10-28 16:19:08 +02:00
iCrawl
c278674e8a chore: change testing to tests for workflow 2021-10-28 02:02:53 +02:00
iCrawl
aa532946c9 chore: repo cleanup 2021-10-28 02:01:19 +02:00
GodderE2D
bdd841a1e7 docs(GuildStickerManager): fix create() example (#6900) 2021-10-28 01:21:52 +02:00
Rodry
fae4abf2f7 feat(MessageEmbed): add #equals (#6885) 2021-10-27 12:08:20 +02:00
Suneet Tipirneni
b2836daafe typings: cache types cleanup (#6867)
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-10-27 12:08:01 +02:00
Advaith
f169c8fe46 fix(ApplicationCommandManager): update guild command cache on c/u/d (#6841) 2021-10-27 12:07:50 +02:00
Rodry
740d3f006e feat(StartThreadOptions): default autoArchiveDuration to channel's defaultAutoArchiveDuration (#6278) 2021-10-27 12:07:28 +02:00
GodderE2D
88060395d1 docs(InteractionResponses): move embed var position in example (#6896) 2021-10-27 01:08:20 +02:00
Suneet Tipirneni
acbfc5c866 chore: bump discord-api-types & builders (#6894) 2021-10-26 21:29:23 +02:00
Rodry
e12a5b6a0c refactor: move Guild setPositions methods to managers (#6875)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2021-10-26 21:28:56 +02:00
Lin
b27888455f refactor: remove gen-esm-wrapper dependency (#6884) 2021-10-26 18:12:16 +02:00
GodderE2D
76856b967a docs(Application): rename Oauth2Application to Application (#6891) 2021-10-26 18:04:10 +02:00
StefansArya
ceaf738d2e fix(TextBasedChannel): return the cached message instead of clone it (#6877) 2021-10-25 00:35:59 +02:00
Jiralite
b6c9fd691f docs(Util): Deprecate .removeMentions() (#6866) 2021-10-25 00:35:13 +02:00
chrdek
7621e9da4c fix(MessageComponentInteraction): component getter is not null anymore (#6835) 2021-10-25 00:34:53 +02:00
Almeida
672baa49e6 refactor: fix typos (#6852) 2021-10-24 21:34:37 +02:00
Suneet Tipirneni
c3948f8253 types: allow message cached props to be narrowed (#6838)
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-10-24 21:31:42 +02:00
Jiralite
579569ae18 refactor(GuildManager): Remove redundant check (#6859) 2021-10-19 16:11:50 +02:00
Jiralite
399e720b92 feat: Add rtcRegion to GuildManager#create() (#6858) 2021-10-19 16:11:29 +02:00
Suneet Tipirneni
e0afcadda4 feat: add typeguards to webhooks (#6850) 2021-10-19 16:11:21 +02:00
Suneet Tipirneni
4dff279a6f fix: PartialGuildMember#id is not null (#6840) 2021-10-17 16:19:42 +02:00
Skick
487d32d303 feat(GuildChannelManager): add 'rtcRegion' option to 'create' method (#6849)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-10-17 16:18:33 +02:00
ckohen
7513b4528c feat(Permissions): add checkAdmin to permission overwrite checks (#6847) 2021-10-17 00:27:52 +02:00
Suneet Tipirneni
e8b69974dc types(CommandInteractionOptionResolver): allow narrowing of getMember() (#6831) 2021-10-17 00:19:49 +02:00
Jiralite
d27fddbf9a types(BaseMessageComponent): Remove third parameter of create() (#6833) 2021-10-17 00:19:36 +02:00
Jiralite
d193d04cea fix(Webhook): Resolve source guild only if cached (#6834) 2021-10-17 00:19:23 +02:00
ObscuritySRL
ef01b84fa8 fix(AllowedImageSizes): add new image sizes (#6844) 2021-10-17 00:18:17 +02:00
Jiralite
f7b7aac8b6 docs: Correct tags used for objects (#6846) 2021-10-17 00:17:33 +02:00
Jiralite
267a4b3f68 fix(MessageReaction): Prevent event double fire from uncached messages (#6818) 2021-10-17 00:16:05 +02:00
Jiralite
38cc89e5ae docs: Redirect to events correctly (#6845) 2021-10-16 00:18:13 +02:00
Jiralite
12ab5c8878 chore: Add missing intent to issue form (#6829) 2021-10-14 20:26:52 +02:00
Jiralite
c44ea50157 docs: Typos, consistency and grammar fixes (#6811) 2021-10-13 12:20:44 +02:00
Oscar Dominguez
046f44b807 ci(workflow): add cache to workflows using actions/setup-node (#6821) 2021-10-13 12:19:07 +02:00
Jiralite
4354c37762 docs(Message): Specify Snowflake in return type of awaitReactions() (#6822) 2021-10-13 12:18:00 +02:00
Suneet Tipirneni
b541d0a524 types: message component cached props narrowing (#6809) 2021-10-12 21:11:37 +02:00
Hackerboi 69
6898fa3b37 feat(Interaction): add isApplicationCommand check (#6801) 2021-10-12 21:11:32 +02:00
Jiralite
460df9eb4d refactor: Remove redundant user agent parsing (#6820) 2021-10-12 21:11:25 +02:00
Rodry
bd48e6df84 feat(CommandInteraction): add toString method (#6793) 2021-10-12 21:11:18 +02:00
Rodry
5566404850 types(ApplicationCommandOptionData): remove required on subcommands (#6790) 2021-10-12 21:11:11 +02:00
Alessandro Impellizzeri
29667c96e5 fix(Guild): guild.available is never set on new joins (#6769) 2021-10-12 21:10:59 +02:00
Jeroen Claassens
b47467755c fix(Types): export more types (#6808) 2021-10-12 19:38:12 +02:00
Jiralite
187581dd84 types(Integration): Add IntegrationType values (#6815) 2021-10-12 19:35:26 +02:00
Jiralite
b030130df1 docs: Replace FetchOwnerOptions type definition (#6814) 2021-10-12 19:35:16 +02:00
Jiralite
d57ec7ab68 docs: Remove dangling reference (#6810) 2021-10-11 13:57:00 +02:00
Brage
b1b9c83df0 docs(InteractionCollector): remove repeated "the" (#6802) 2021-10-11 13:54:16 +02:00
Shubham Parihar
bfb89de864 fix(GuildBanManager): send reason in the headers instead of json body (#6800) 2021-10-09 15:02:39 +02:00
ckohen
26f927b9fe feat(Client): add apiResponse and apiRequest events (#6739)
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <24881032+SpaceEEC@users.noreply.github.com>
2021-10-09 13:56:25 +02:00
Rodry
0d599a1a76 fix(User): don't generate the banner URL when not cached (#6783) 2021-10-08 12:36:14 +02:00
Bas950
e24209a8b1 refactor: remove unnecessary checks (#6777) 2021-10-08 12:35:24 +02:00
Nico Rausch
d399a28323 feat(ModuleImporter): implement import module compatible with bundlers (#6709) 2021-10-08 12:35:13 +02:00
Shubham Parihar
872e7a59b2 refactor(Role): move initialization of delete prop out of _patch (#6776) 2021-10-07 23:17:47 +02:00
MarkusRost
78124aed28 chore(GuildMemberRoleManager): Remove unnecessary !prev check (#6781)
Co-authored-by: Bas950 <bas.van.zanten007@gmail.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-10-07 18:29:00 +02:00
ckohen
b1656bfb4f fix(GuildMember): more explicit partial check (#6760) 2021-10-07 18:28:32 +02:00
MarkusRost
03c4b60384 GuildMemberRoleManager: add role that sets the role icon/emoji (#6768)
Co-authored-by: Almeida <almeidx@pm.me>
2021-10-07 18:28:12 +02:00
Jiralite
45ebea3216 types(WelcomeChannelData): Allow store channels (#6778) 2021-10-07 18:24:53 +02:00
Suneet Tipirneni
a84e51b767 types: make embed author and footer props name and text required (#6779) 2021-10-07 18:24:48 +02:00
Shubham Parihar
e31c5ca1a8 fix(Role): check for presence of icon and unicode_emoji before patching (#6780) 2021-10-07 18:24:33 +02:00
J-Human
d32956c6b7 docs(MessagePayload): change the typo of "wether" to "whether" (#6771) 2021-10-06 08:40:25 +02:00
iCrawl
adc850aa67 chore: release 2021-10-05 16:17:53 +02:00
iCrawl
26340acad9 chore(Release): version 2021-10-05 16:09:40 +02:00
Souji
8bc1ece98e docs: fetchReply info + example (#6753) 2021-10-05 01:37:04 +02:00
Rodry
ba93e85d0d refactor(User): set accentColor and banner to undefined when not yet received (#6721)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-10-05 00:16:59 +02:00
ObscuritySRL
d0025beb7b fix(AllowedImageSizes): add new image sizes (#6754) 2021-10-05 00:10:54 +02:00
Demir
c5421af68e chore(package): change homepage (#6550) 2021-10-05 00:08:13 +02:00
Almeida
a194d9c37f refactor: use optional chaining (#6757) 2021-10-05 00:04:53 +02:00
Suneet Tipirneni
d873a19d34 types(Interaction): allow Interaction cached properties to be type narrowed (#6668)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-10-05 00:01:43 +02:00
Antonio Román
f88f4cca64 types: rename Awaited<T> to Awaitable<T> (#6756) 2021-10-04 14:11:42 +02:00
Rodry
00e1e2673b fix(User): compare flags in #equals (#6750) 2021-10-04 09:38:28 +02:00
Rodry
1db3e76054 docs(GuildMemberUpdateAction): event doesn't get emitted on user update (#6752) 2021-10-04 09:38:07 +02:00
Jiralite
7eec06145a fix(VoiceState): Patch streaming value (#6747) 2021-10-03 22:55:27 +02:00
Rodry
c3f4de4801 types(GuildBanManager): remove can return null (#6748) 2021-10-03 22:55:14 +02:00
Rodry
42acc6eef9 types: add ExcludeEnum utility for easier typings (#6746)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-10-03 22:54:43 +02:00
Jiralite
32b5c2e617 types(Webhook): More accurate type for sourceChannel (#6751) 2021-10-03 22:53:37 +02:00
Jiralite
abf158dc94 types(WebhooksUpdate): Allow NewsChannels (#6749)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2021-10-03 22:53:20 +02:00
Shubham Parihar
7129965423 feat: add support for role icons (#6633) 2021-10-03 18:55:29 +02:00
SpaceEEC
a8c21cd754 fix(Message): avoid overwriting properties in _patch (#6738) 2021-10-03 15:27:00 +02:00
Jiralite
6e5c768379 docs: Better links for .toJSON() of button and select menu (#6745)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2021-10-03 15:26:21 +02:00
SpaceEEC
d15dd5f07d fix(ReactionCollector): only call the filter function once (#6734) 2021-10-03 15:04:37 +02:00
SpaceEEC
905d100d4d fix(Shard): use provided timeout when respawning (#6735) 2021-10-03 15:04:23 +02:00
SpaceEEC
34b2ad0d8e docs: undocument private constructors (#6732) 2021-10-03 15:02:11 +02:00
Jiralite
a8e60105fb types: More accurate types instead of GuildChannelResolvable (#6744) 2021-10-03 15:01:38 +02:00
Almeida
9e421f6ccf fix(Role): toJSON() throwing due to permission bigints (#6724) 2021-10-03 15:01:24 +02:00
ObscuritySRL
28d96e344b feat(Interaction): add memberPermissions (#6741)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2021-10-03 15:01:07 +02:00
Rodry
3eacf7a587 feat(CategoryChannel): add createChannel shortcut method (#6614) 2021-10-03 15:00:41 +02:00
Almeida
e9daa31eaf perf: use logical assignments instead of if statements (#6693) 2021-10-03 14:59:57 +02:00
Rodry
9eb9591473 fix: don't patch set data with undefined (#6694) 2021-10-03 14:59:52 +02:00
Rodry
8b4456e0aa types(ChannelTypes): remove unknown from CHANNEL options (#6701) 2021-10-03 14:59:45 +02:00
Rodry
b76bb8a409 fix(Invite): #guild never resolving into a Guild (#6742)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-10-02 23:46:32 +02:00
Jiralite
107822d28d feat: Allow webhooks to fetch, edit and delete messages in threads (#6695)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-10-02 13:42:25 +02:00
Nyan Spaghetti
cdf65f74e1 fix(GuildManager): add missing types and converts (#6683)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2021-10-02 13:42:10 +02:00
muchnameless
a7cb314e07 types(TextBasedChannels): fix awaitMessageComponent return type (#6723) 2021-10-02 13:41:53 +02:00
Jiralite
3a978f347c types(Vanity): Make uses non-nullable (#6715) 2021-10-02 13:41:30 +02:00
Advaith
10478ad148 feat(Threads): update permissions and fix getters (#6466) 2021-10-02 13:41:05 +02:00
muchnameless
7c4d1dffb4 types(Role): Role#comparePositionTo accepts RoleResolvable (#6722) 2021-10-02 13:40:52 +02:00
Jiralite
2803db683d feat(PartialGroupDMChannel): Add recipients & fix name (#6713) 2021-10-02 13:40:40 +02:00
cherryblossom000
3f1100976f docs(Message): fix return type for reply (#6720) 2021-10-02 13:40:15 +02:00
Almeida
531b46c60d refactor: use the node: protocol (#6710) 2021-10-02 13:40:02 +02:00
Rodry
466e796a1d docs(CommandInteractionResolvedData): fix key type (#6729) 2021-10-02 13:38:59 +02:00
Almeida
8d80fec86d fix(Util): default animated to false when omitted on resolvePartialEmoji (#6725) 2021-10-02 13:38:37 +02:00
Rodry
fe9500538e types(Presence): fix ActivityOptions#type and Activity#id types (#6696) 2021-09-28 18:57:09 +02:00
ckohen
da3ae4854e types: fix missing channel type in subcommand options (#6706) 2021-09-28 18:55:39 +02:00
Rodry
dfd7b403a9 feat(GuildMember): add guild avatars (#5696)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
Co-authored-by: GoldenAngel <50855202+GoldenAngel2@users.noreply.github.com>
2021-09-28 18:53:37 +02:00
Shubham Parihar
7cba67620e docs(EmojiResolvable): update description of typedef to remove ambiguity (#6708) 2021-09-28 18:52:47 +02:00
Shubham Parihar
c5db0ff606 feat(MessageAttachment): add support for ephemeral property (#6652)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2021-09-28 18:52:03 +02:00
Rodry
60aa9ae478 fix(Message): throw error on missing channel (#6581)
Co-authored-by: D Trombett <73136330+DTrombett@users.noreply.github.com>
2021-09-28 18:51:42 +02:00
ckohen
3b14883e34 feat(ApplicationCommand): add support for channel_types (#6640)
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-09-27 13:49:39 +02:00
Shubham Parihar
8426770865 fix(CachedManager): return updated data when cache is false (#6685) 2021-09-27 13:49:25 +02:00
Rodry
79b1b20562 chore(IssueForms): remove default titles (#6659)
Co-authored-by: Souji <timoqueezle@gmail.com>
2021-09-26 21:39:52 +02:00
Jiralite
60b8ba6b86 fix(GuildEmoji): Cache restricted roles and author data (#6675) 2021-09-26 21:38:58 +02:00
Rodry
d3da83368d fix(Constants): allow undefined size (#6686)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-09-26 21:38:11 +02:00
Jiralite
f8aa4bd470 fix(*RoleManager): Create set of role ids correctly (#6674)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-09-26 21:33:59 +02:00
Shubham Parihar
a06a87a7c4 feat(UserManager): allow #fetch to take UserResolvable (#6677) 2021-09-26 21:33:50 +02:00
Advaith
1ca8d2c8e8 types: add GuildEmojiManager to Caches (#6671) 2021-09-26 21:33:25 +02:00
Shubham Parihar
42fdcaa1da feat: add api error code 50101 (#6663) 2021-09-26 21:33:20 +02:00
Andreas Clausen
94ca0f599d typings(VoiceState): allow moving members to stage channels (#6684) 2021-09-26 21:33:11 +02:00
Megatank58
839974ca43 docs(ApplicationCommandPermissionsManager): fix example set method (#6658) 2021-09-23 14:04:49 +02:00
D Trombett
5070d23914 fix(Shard): eval promise never resolves (#6649) 2021-09-23 13:48:22 +02:00
Suneet Tipirneni
ecd637f7d6 feat: Add support for API command types in ApplicationCommandManager (#6621) 2021-09-23 13:47:17 +02:00
Advaith
66a90d3f89 feat(Permissions): add START_EMBEDDED_ACTIVITIES (#6622) 2021-09-23 13:47:09 +02:00
Rodry
caa3b60c30 feat(Integration): add missing props and fix docs/types (#6623)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-09-23 13:47:01 +02:00
Rodry
29dd319b68 refactor(VoiceState): use manager edit method to remove error (#6631) 2021-09-23 13:46:55 +02:00
Rodry
124e177e91 refactor(Constants): better type error in cdn endpoints (#6637) 2021-09-23 13:46:40 +02:00
Apokalypt
034782641a types(Interaction): improve type guard for inGuild() (#6644) 2021-09-23 13:42:27 +02:00
Jiralite
b9a4899491 docs(Shard): Point to correct events (#6641) 2021-09-23 13:41:26 +02:00
tig
5d87398f9f fix(xxxable): follow more properly with discord behavior (#6551)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-09-23 13:41:18 +02:00
Shubham Parihar
603350645d fix: allow null to be passed in order to reset icon/avatar (#6646) 2021-09-23 13:40:51 +02:00
Rodry
92f6471e8e types(MessageOptions): allow APIEmbed (#6656) 2021-09-18 01:09:49 +02:00
tig
88e2622dde docs(VoiceChannel): deprecate editable (#6613) 2021-09-15 00:26:10 +02:00
Jiralite
75d85f7838 types(WelcomeChannel): Allow store channels (#6615) 2021-09-15 00:26:03 +02:00
Rodry
8add4b08f5 feat: default values for setX boolean methods (#6619) 2021-09-15 00:25:50 +02:00
Souji
0a71a4d18f chore: issue forms (#6611) 2021-09-15 00:25:19 +02:00
Shubham Parihar
183dbd7e53 feat: add api error code 30042 (#6635) 2021-09-15 00:24:16 +02:00
Rodry
256fb905fe types(MessageEmbed): allow APIEmbed type (#6629) 2021-09-15 00:19:49 +02:00
Jiralite
3c3522ae8a docs(PermissionOverwriteManager): Correct @returns of delete (#6632) 2021-09-15 00:19:04 +02:00
Suneet Tipirneni
be8912a421 feat: Give removed MessageReactions on messageReactionRemoveAll event (#6607)
Co-authored-by: D Trombett <maxtromb.dt@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-09-10 20:32:05 +02:00
Shubham Parihar
1b016a30c8 types(TextBasedChannelFields): add back createMessageCollector (#6616) 2021-09-10 20:31:29 +02:00
Rodry
3183b1166a fix(Message): pinnable returning false in non-DEFAULT messages (#6585) 2021-09-09 19:51:21 +02:00
Shubham Parihar
f866512e84 feat(ApplicationCommand): add version property (#6603)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-09-09 18:52:39 +02:00
Suneet Tipirneni
8cc3885739 typings: make channelId non-nullable on MessageComponentInteraction (#6600) 2021-09-08 14:42:05 +02:00
Suneet Tipirneni
c62823e43d typings: Message#createMessageComponentCollector use MessageComponentInteractionOptions<T> (#6596) 2021-09-08 14:36:15 +02:00
Jiralite
ea3695585d types(MessagePayload): Specify typings for files and resolveFile (#6608) 2021-09-08 14:34:53 +02:00
Jiralite
ea6a57e927 docs(MessagePayload): Correct return type of resolveFile() (#6605) 2021-09-08 14:34:26 +02:00
Hackerboi 69
f57791c5fe chore: remove jsdoc.json (#6587) 2021-09-05 15:40:41 +01:00
Bvdgames
8826e9ffbc fix(threadMembersUpdate): fixed typo (#6589) 2021-09-05 15:39:47 +01:00
Rodry
db73cf9255 docs(MessageButton): fix info tag (#6590) 2021-09-05 15:39:27 +01:00
Rodry
08edc0b1db fix(ThreadChannel): fetchStarterMessage bug (#6584) 2021-09-03 18:22:49 +01:00
Rodry
00bd92a451 refactor: ES2021 features (#6540)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-09-03 12:58:01 +01:00
Advaith
d81590d566 feat(MessageTypes): add CONTEXT_MENU_COMMAND (23) (#6425) 2021-09-03 12:57:33 +01:00
Souji
06460565e4 chore: issue forms (#6583) 2021-09-03 12:53:05 +01:00
Suneet Tipirneni
08419561ed typings: Collector filter parameter inference (#6574) 2021-09-01 11:07:26 +01:00
Shubham Parihar
d16ada9708 feat: add api error code 160002 (#6566) 2021-08-31 11:38:27 +01:00
Rodry
cdb00053de typings(MessageReference): correctly add undefined type (#6563) 2021-08-31 11:38:12 +01:00
Jiralite
2c219cb982 types: @typedef for StageChannelResolvable (#6568) 2021-08-30 21:57:54 +01:00
ckohen
581921f8b7 feat(ApplicationCommand): add #equals (#6414)
Co-authored-by: Juruel Keanu Lorenzo <keanulorenzo32@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2021-08-30 11:56:47 +01:00
Suneet Tipirneni
f49f70a4eb fix: await message component collectors should return component interactions not collectors (#6562) 2021-08-30 11:55:39 +01:00
Souji
54b33dd7df chore: issue forms (#6560)
* workflow: issue forms

* chore: make intents and partials dropdowns

* chore: add tip about multi-select

* chore: use typescript for cb
2021-08-30 11:53:55 +01:00
GodderE2D
33f6f8211f docs(WidgetMember): fix typo for deaf (#6564) 2021-08-30 08:10:59 +01:00
Jiralite
29d5fd163c docs(Constants): Fix interaction type link (#6558) 2021-08-29 23:45:59 +01:00
Jiralite
34024f5ef6 docs: Fix JSDoc for ClientUser#edit (#6554) 2021-08-29 20:55:39 +01:00
DraftMan
9301c9b420 fix(GuildChannel): Fix manageable method for voice-channels (#6447)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Kyra <kyranet@users.noreply.github.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
2021-08-29 16:26:05 +01:00
Suneet Tipirneni
03d5549461 typings: Allow message component interaction collectors to infer collected interaction types (#6476) 2021-08-29 16:25:58 +01:00
Jiralite
774e9609d2 typings(CommandInteractionOptionResolver): Document & type thread channels (#6521) 2021-08-29 13:23:20 +01:00
ckohen
a6932546e2 feat(Threads): add support for invitable in private threads (#6501)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-29 13:23:01 +01:00
Rodry
0fe5f88316 types(MessageComponentInteraction): fix componentType (#6536) 2021-08-29 13:22:53 +01:00
Jiralite
b89280a1dd docs(Util): Correct @param for cleanContent() (#6531) 2021-08-27 09:39:19 +01:00
Casper
fc51f61f0c feat(BaseGuildTextChannel): export BaseGuildTextChannel (#6527) 2021-08-25 23:41:15 +01:00
Jeroen Claassens
49e3a14d30 ci: setup npm auto deprecate workflow (#6520)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-25 18:22:24 +01:00
Megatank58
7d4a40a26d docs(Formatters): fix typo of TimestampStyles (#6523) 2021-08-25 13:20:00 +01:00
Sugden
8a8c69a257 fix(MessageAttachment): re-assign name (#6518) 2021-08-24 21:32:56 +01:00
Advaith
839c6da03d feat(User): banners and accent colors (#6117)
* feat(User): support banners

don't mind it for now, just trying

* feat(User): support banners

* fix(Constants): declare dynamic

* fix(User): eslint

* typings: update User typings

* fix(User): add banner to equals and json bannerURL

* typings: missing dynamic

* refactor: xID to xId

* types: re-add typings

* feat: add banner color and fetch note

* feat: switch to accent color (swap hex and dec))

* Update src/structures/User.js

Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>

* Update typings/index.d.ts

Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Koyamie <koyamie1@gmail.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
2021-08-24 21:32:18 +01:00
Justin
96e26c428d feat(MessageAttachment): allow files to be marked as spoilers (#6509)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-08-24 21:25:45 +01:00
Danny May
5c276398d6 typings: mark enums as const enums (#6394)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-24 21:24:34 +01:00
Rodry
705c5a1c17 feat(ThreadChannel): add fetchStarterMessage (#6488)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-08-24 21:22:11 +01:00
Rodry
4bfd5d3e74 docs(GuildChannelCreateOptions): fix #type type (#6502) 2021-08-24 21:21:43 +01:00
Jiralite
8a95211230 docs(ThreadManager): Fix typo (#6485) 2021-08-24 21:21:22 +01:00
Kevin
141864917a fix(UserUpdateAction): rely on client.user when ids match (#6511) 2021-08-24 21:21:07 +01:00
Jiralite
57b94b9adf feat(Message): Add method to resolve a component by id (#6484) 2021-08-24 21:20:43 +01:00
Megatank58
9ca10cce06 docs: fix wrong type being displayed in docs (#6504) 2021-08-24 21:20:23 +01:00
Rodry
fb50dd9841 feat: set methods for MessageActionRow and MessageSelectMenu (#6490) 2021-08-24 21:20:03 +01:00
Jeroen Claassens
7aff15a055 typings(MessageEmbed): allow null for setTimestamp (#6514) 2021-08-24 21:19:03 +01:00
monbrey
c232baa715 typings: require component type in raw object formats (#6452) 2021-08-23 15:26:22 +01:00
Deivid
656b51875f typings(CommandInteractionOptionResolver): add missing parameter (#6497) 2021-08-23 15:23:27 +01:00
Walker Gray
c14e594d8a feat: export BaseCommandInteraction (#6478) 2021-08-23 15:22:48 +01:00
Francis Rivard
21983de3e0 feat(Guild): Add Guild#maximumBitrate getter. (#6455)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-08-23 15:19:55 +01:00
Francis Rivard
f39b597e31 feat(Message): prevent fetching an interaction webhook. (#6468) 2021-08-23 15:18:49 +01:00
Rodry
70cc0295f8 docs(MessageManager): fix typo (#6482) 2021-08-21 20:14:18 +01:00
MarkusRost
d6e6244336 fix(Util): allow empty strings in splitMessage (#6437) 2021-08-18 09:47:13 +01:00
Rodry
93a83c2cf7 docs(MessageReference): add possible message types (#6464) 2021-08-17 21:50:14 +01:00
Rodry
17b407935b docs(ApplicationCommandType): add DAPI link (#6463) 2021-08-17 21:49:53 +01:00
Rodry
6cac03a394 types(ClientPresence): add type declarations and docs (#6450) 2021-08-17 21:49:36 +01:00
Milo
76cf52cd0d chore(Typings): fix WebhookEditMessageOptions not having attachments (#6430) 2021-08-17 21:49:26 +01:00
Shubham Parihar
a4b8623b60 feat: add maximum prune requests reached api error (#6427) 2021-08-17 21:46:17 +01:00
Shino
5eb3553fd1 feat(Rest): expose https.Agent options (#6177)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-08-17 21:45:32 +01:00
ckohen
16493e65fd docs(BufferResolvable): add warning for URL input (#6451) 2021-08-17 21:44:37 +01:00
Synbulat Biishev
f294d1eff2 typings(GuildChannel): Added missing typing (#6454) 2021-08-17 21:44:02 +01:00
HyRo
9a833b1e0e fix(BaseClient): Remove selfbot ability (#6429) 2021-08-16 08:30:35 +01:00
monbrey
d289d5ccb7 feat(InteractionReponses): allow fetching of ephemeral messages (#6426) 2021-08-15 12:10:43 +01:00
Jiralite
2c449b6b48 fix(Sticker): Rename method correctly to _add (#6421) 2021-08-15 12:10:31 +01:00
BannerBomb
81bb68d3be typings: Message#_patch typings return type (#6433) 2021-08-15 12:09:49 +01:00
Koyamie
170c0c4985 feat: export ContextMenuInteraction (#6434) 2021-08-15 12:09:21 +01:00
ahmood
ecb6e50b46 fix(Message): fix typo (#6435) 2021-08-15 12:08:51 +01:00
Jiralite
0109ad0466 chore: Ignore .DS_Store (#6438) 2021-08-15 12:08:20 +01:00
Jiralite
84bb4f4153 docs(Formatters): Use id over ID (#6439) 2021-08-15 12:08:06 +01:00
Sugden
71fdf6fae0 refactor(Channel): make delete async (#6417) 2021-08-14 03:50:53 +01:00
Gm
759faa4174 docs(RoleManager): error in examples (#6416) 2021-08-14 03:50:44 +01:00
monbrey
615afab8bb docs: rename implementation of deferReply (#6412) 2021-08-13 01:24:05 +01:00
iCrawl
f1d5ffce04 chore: set dev version 2021-08-13 00:35:05 +02:00
iCrawl
d0bc4d7ff0 chore(Release): version 2021-08-13 00:32:27 +02:00
Ben
2bf09703c1 feat(GuildMemberManager): add 'list' method (#6403)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Ben <BenjammingKirby@users.noreply.github.com>
2021-08-12 23:05:06 +01:00
Suneet Tipirneni
dcc556c311 typings(ApplicationCommandData): make type field optional (#6405) 2021-08-12 22:12:29 +01:00
Jan
14aea12900 feat(GuildManager): allow setting with_counts to false (#6407) 2021-08-12 22:12:11 +01:00
Jan
e6f48d849f docs: remove unparsed examples (#6404) 2021-08-12 18:01:09 +01:00
Jan
933d2c5eb7 docs(GuildManager): increase fetch limit to 200 (#6406) 2021-08-12 17:29:30 +01:00
Mestery
bbda3c4beb chore(exports): allow imports of specific paths (#6367) 2021-08-12 15:10:38 +01:00
Jiralite
dce8fc7b9d fix(StageInstance): Ensure discoverableDisabled is not undefined (#6395) 2021-08-12 15:06:26 +01:00
Jiralite
44bbfa5c46 fix(WidgetMember): Default to null and not undefined (#6399) 2021-08-12 15:06:11 +01:00
Jiralite
4a64662a7d fix(Guild): preferredLocale to always be a string (#6402) 2021-08-12 15:06:03 +01:00
Suneet Tipirneni
6342430073 typings(Constants): add ApplicationCommandTypes to Constants (#6398) 2021-08-12 15:05:57 +01:00
Suneet Tipirneni
297a9118e7 typings(ApplicationCommandOptionData): Align command data options types more with discord API (#6247)
* types(ApplicationCommandData): align command data more with discord API

* types(ApplicationCommandData): clean up type definitions a bit

* types(ApplicationCommandData): fix issue where  could be used with  and

* types(ApplicationCommandOptionData): make subcommand option stronger

* test(ApplicationCommandOptionData): add typing tests
2021-08-12 15:05:41 +01:00
monbrey
fff887b2f4 feat(CommandInteractionResolvedData): access to "raw" resolved data (#6384)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-08-12 15:04:40 +01:00
monbrey
d9456a1a76 fix(ContextMenuInteractin): store message as raw value (#6400) 2021-08-12 11:38:42 +01:00
Jeroen Claassens
cd4029218f feat(Utils): add additional formatters (#6388) 2021-08-11 21:06:10 +01:00
Suneet Tipirneni
75b48d8d0f types(ApplicationCommandData): Stronger typings for ApplicationCommandData variants. (#6382) 2021-08-11 08:14:54 +01:00
DaStormer
de3c86f804 docs(ApplicationCommandData): fix type property (#6385) 2021-08-11 08:04:49 +01:00
monbrey
0266f28096 feat: right-clickybois (context menu support for ApplicationCommand and CommandInteraction) (#6176)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-08-10 23:56:12 +01:00
ckohen
779e14ef61 docs: update links for api-docs (#6380) 2021-08-10 23:52:51 +01:00
ckohen
4c8dc4cda6 docs: switch urls from upstream rearranging (#6378) 2021-08-10 21:33:32 +01:00
Jiralite
49d3c0bf87 docs: Correct wrong interaction links (#6274)
* docs: Correct wrong interaction links

* docs: fix errors and apply single option

* Update src/structures/CommandInteraction.js

Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-10 21:32:28 +01:00
Nico
3c17939fd5 fix(Util): remove truthy check before isNaN check (#6358)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-08-10 21:14:41 +01:00
Kevin
2a3e819fcf typings(Options): createDefaultOptions => createDefault (#6376) 2021-08-10 21:08:41 +01:00
Francis Rivard
006edca410 typings(Events): renamed messageReactionAdd's reaction parameter (#6371)
Nothing important but why not update it.
2021-08-10 15:33:51 +01:00
Noel
91740ecc30 chore(README): extend installation 2021-08-10 15:27:06 +01:00
Gilang Ramadhan
2985e5380f chore(README): more explanation in README.md (#6354)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-10 15:25:59 +01:00
Casper
0062aa6f72 docs(Invite): MANAGE_CHANNELS instead of MANAGE_CHANNEL (#6361) 2021-08-09 17:30:30 +01:00
Koyamie
ea8d77ea62 docs(Options): defaultMakeCacheSettings typo (#6365)
fix defaultMakeCacheSettings to be consistant with the actual name.
2021-08-09 17:29:21 +01:00
Sugden
cd393fd421 chore: update conventional commit URL (#6351) 2021-08-08 18:11:45 +01:00
JeroenoBoy
efc20ff669 types(ApplicationCommandOptionData) changed options type (#6347)
* Changed ApplicationCommandOptionData interface

The options type `this[]` as a self reference causes issues when implementing this interface. Changing this to ApplicationCommandOptionData[] fixes this issue
https://imgur.com/a/0eVBoJU

* fixed ApplicationCommandOption

* Update typings/index.d.ts

Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-08 17:37:58 +01:00
Almeida
5f1def3793 types(ImageURLOptions): allow 'gif' format (#6342)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-08-08 17:36:16 +01:00
Advaith
47d2ef3e40 fix(Constants): fix CDN endpoint typings (#6332) 2021-08-08 12:45:00 +01:00
Muhimur
f13d27ca2e docs: grammar fixes (#6345) 2021-08-08 11:57:50 +01:00
Jiralite
570fba33d3 chore: Rename various stuff to "main" (#6343)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-08 00:08:00 +01:00
Shino
94bb953bf1 ci(PublishDev): remove t and hardcoded dev version (#6238)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-07 21:20:32 +01:00
ahmood
917e71a9ee fix(Managers): fix typo in unsupported warning (#6338) 2021-08-07 21:19:51 +01:00
Papageorgiadis Savvas
394d48649f feat(Threads): max autoArchiveDuration option (#6304)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-07 21:19:29 +01:00
SinisterDeveloper
d87299ba20 fix(GuildMemberRoleManager): typo (#6335) 2021-08-07 16:50:28 +01:00
ckohen
d14a6bfe1d refactor(Options): separate default settings for make cache (#6330) 2021-08-07 16:41:12 +01:00
iCrawl
68c059165b chore: fix bug report and feature request templates 2021-08-07 13:41:41 +02:00
iCrawl
d1d740c1a5 chore: even more labels 2021-08-07 13:31:23 +02:00
iCrawl
ed0f605b23 chore: add additional topic labels 2021-08-07 13:21:37 +02:00
Noel
b2e23ca03c chore: give labels a facelift (#6333) 2021-08-07 12:07:03 +01:00
iCrawl
0d765f53d2 chore: dev version 2021-08-07 11:46:31 +02:00
iCrawl
622f398f4b chore(Release): prepare release 2021-08-07 11:39:43 +02:00
Noel
909c87353e fix(GuildMemberManager): refactor fetchMany (#6328) 2021-08-07 10:35:51 +01:00
Souji
ceae5960ed fix(Message): handle fetched messages (#6325) 2021-08-07 10:35:30 +01:00
Tiemen
60ace9a2d4 types(Util): fix cleanContent parameter type (#6321) 2021-08-07 00:59:03 +01:00
Matt (IPv4) Cowley
9e6a627a13 chore: add other maintainers to GH Sponsors config (#6329) 2021-08-06 23:09:43 +01:00
iCrawl
2b61fb5b3c ci: fix deprecation 2021-08-06 17:45:56 +02:00
Jan
cd1aefb46c docs: fix bad indentation (#6316) 2021-08-06 16:43:21 +01:00
iCrawl
3bff08acf7 chore: bump version 2021-08-06 17:38:30 +02:00
iCrawl
cfde127072 chore: prepare release 2021-08-06 15:30:54 +02:00
ckohen
1200bba7bc fix(MessageMentions): check guild exists before adding roles (#6313) 2021-08-06 14:07:31 +01:00
Noel
52817fc414 fix(GuildMemberManager): fetchMany fixes (#6314) 2021-08-06 14:07:14 +01:00
ckohen
3725dcafc0 fix(Caching): sweep archived threads in all channel caches (#6312) 2021-08-06 13:54:19 +01:00
Rodry
a0974fdbbb ci: update to node 16 (#6315) 2021-08-06 13:41:13 +01:00
Voltrex
d5e28c2298 refactor: replace dependency with initial implementation (#6310) 2021-08-06 13:15:51 +01:00
TotallyNotNero
7787a7695a docs: grammatical fix (#6311) 2021-08-06 13:15:23 +01:00
Muhimur
06644770c8 docs: grammar fixes (#6308) 2021-08-06 08:45:12 +01:00
슈리튬
913c9fa176 fix(Message): fix thread getter (#6309)
For ThreadChannel, errors occur because channel.threads do not exist.
2021-08-06 08:44:56 +01:00
iCrawl
a56ba097dc chore: deps 2021-08-06 01:25:20 +02:00
Rodry
f473f43d08 feat(Collector): return a boolean on checkEnd (#6289) 2021-08-05 20:34:17 +01:00
Rodry
b4afcf8236 docs: general cleanup and improvements (#6299)
Co-authored-by: DaStormer <40336269+DaStormer@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-08-05 20:34:06 +01:00
Jan
4241febe24 refactor(Interaction): rename defer to deferReply (#6306) 2021-08-05 17:30:13 +01:00
DaStormer
5b4efd13c9 feat(Channel): add isVoice() (#6297) 2021-08-05 16:41:06 +01:00
Timo
dd3a79eead docs: typo in ClientOptions (#6305) 2021-08-05 16:40:55 +01:00
Bluenix
b639b6c653 refactor(InteractionCollector): only keep Ids of objects (#6084)
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-05 16:40:23 +01:00
monbrey
3eb41405f4 fix(BaseGuildTextChannel): call patch (#6298) 2021-08-04 23:45:26 +01:00
ckohen
a6d4035176 fix: remove support for overriding caches that break functionality (#6282)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-04 22:04:40 +01:00
monbrey
5be471b47d refactor(Channels): fix incorrectly shared properties (#6262)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2021-08-04 21:55:31 +01:00
Suneet Tipirneni
ae6200e58e types(MessageButtonOptions): Clean up and export some button option type definitions (#6291) 2021-08-04 21:48:46 +01:00
Souji
6e3236ab64 fix(Message): make #channel and #guild getters (#6271) 2021-08-04 21:47:32 +01:00
Jeroen Claassens
5b0621fb3a types: make MessageTarget extend on TextBasedChannels (#6296)
@kyranet and I found the bug when updating @skyra/editable-commands
when our custom function that accepted an argument of `MessageTarget`
was suddenly no longer accepting `message.channel`. Turns out it was
because of a mistake @kyranet made lulz
2021-08-04 21:33:03 +01:00
Muhimur
90c2e072bf docs: grammar fix (#6294) 2021-08-04 09:49:28 +01:00
Pixxies Design LTD
00d5ceebf7 Fixed typos in the slash command register example (#6292)
## First "example usage" example
Added a period to the first console.log for consistency. Corrected typo in second console.log to read "Successfully".
2021-08-04 00:44:05 +01:00
Antonio Román
6b2098f7c7 feat(Constants): added more error codes (#6234)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-03 23:14:25 +01:00
ckohen
09471be30e fix(WebSocketShard): mark shard ready if no guilds intent (#6284)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-08-03 23:13:18 +01:00
Antonio Román
61db5f7618 refactor: added TextBasedChannels type (#6286) 2021-08-03 23:12:51 +01:00
muchnameless
a72b5a355e fix(Action): getChannel interaction DM (#6280) 2021-08-03 23:10:17 +01:00
muchnameless
3c7c82292a refactor(MessageComponents): default setDisabled to true (#6279) 2021-08-03 23:10:04 +01:00
muchnameless
35fa3b3103 docs(Client): mark _finalize as private (#6281) 2021-08-03 00:45:09 +01:00
Timotej Rojko
15aea68946 types(Caches): add GuildStickerManager and GuildInviteManager (#6268) 2021-08-02 19:58:34 +01:00
Rodry
7e0618f17a fix(GuildChannel): setParent not working (#6276)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-08-02 19:38:30 +01:00
Superchupu
6e0ea020c0 docs: update link of the guide to v13 changes (#6273) 2021-08-02 11:58:21 +01:00
Superchupu
2c452dffb8 docs: add missing semicolon to readme (#6270) 2021-08-02 08:43:36 +01:00
Sugden
e2e4f6518b refactor(*): use async functions (#6210) 2021-08-02 00:47:43 +01:00
Superchupu
626ff85ae7 docs: change example in readme to slash command (#6250)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-08-01 16:58:41 +01:00
Kevin
7c540764f0 refactor(GuildChannel): use filter method for #members (#6253)
Co-authored-by: ckohen <chaikohen@gmail.com>
2021-08-01 16:58:06 +01:00
Timotej Rojko
774f5b77ec fix(ChannelUpdate): restore accidentally removed line (#6263) 2021-08-01 16:19:44 +01:00
Jiralite
bb56f17760 docs(InteractionResponses): Correct @returns on responses (#6257) 2021-08-01 11:13:29 +01:00
Vlad Frangu
74fc23b3de chore(Deps): update @discordjs/builders (#6259) 2021-08-01 01:42:20 +01:00
ckohen
93e0239c80 fix(Util): fix collection import (#6256) 2021-08-01 01:26:16 +01:00
Vlad Frangu
60028251f7 chore(Deps): update discord-api-type (#6258)
Bite me, Crawl.
2021-08-01 01:25:56 +01:00
ckohen
00c2bf81cd types: use api-types for stricter typings (#6230)
* types: use api-types for stricter typings

* fix: fixes from pr comments

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>
Co-Authored-By: Antonio Román <kyradiscord@gmail.com>

* types: bigint not BigInt

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-07-31 22:48:11 +01:00
Jiralite
24931d713b refactor(VoiceState): Change kick to disconnect (#6251) 2021-07-31 21:04:10 +01:00
1Computer1
bb5e648f3d refactor: merge collections with keeping entries at max (#6242) 2021-07-31 21:03:58 +01:00
Rodry
a25e16599a feat(MessageEmbed): add setFields method (#6186)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-31 13:15:49 +01:00
Rodry
331a9d3ffc feat(ThreadChannel): add fetchOwner() method (#6207)
* feat(ThreadChannel): add owner and fetchOwner()

* fix(ThreadChannel): remove owner and return ThreadMember with fetchOwner

* fix(ThreadChannel): apply suggestions from code review

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

* fix(ThreadChannel): correctly point to the manager

* docs(FetchOwnerOptions): update desc to mention threads

* fix(ThreadChannel): fetchOwner can return null

* docs(ThreadChannel): owner is nullable

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

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2021-07-31 13:00:33 +01:00
Suneet Tipirneni
77c72e625f types(ButtonMessageOptions): make button/link button typings more specific (#6212)
* types(ButtonMessageOptions): make button typings more specific

* Update typings/index.d.ts

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
2021-07-31 12:59:58 +01:00
Rodry
434e330754 refactor(Message): accept a single object instead of 3 arguments (#6244)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-07-31 12:22:19 +01:00
ckohen
198a5c490d refactor: move member adding to manager (#6231)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-07-31 12:21:47 +01:00
ckohen
2a07055cc0 refactor: use guild-wide route for fetching active threads (#6193)
Co-authored-by: SpaceEEC <24881032+SpaceEEC@users.noreply.github.com>
2021-07-31 12:19:41 +01:00
1Computer1
00bae4fe6b refactor: remove extended collection (#6246)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2021-07-31 12:08:59 +01:00
Jiralite
65ae06429d refactor: Strengthen channel typings in appropriate places (#6232) 2021-07-31 09:52:41 +01:00
Jiralite
82daee576a docs: Refactor a few @returns descriptions (#6228) 2021-07-31 09:51:34 +01:00
ThumusLive
8b52d06ca9 docs(Widget): Add the typedef WidgetChannel (#6182) 2021-07-31 09:51:20 +01:00
1Computer1
bf221f2bef fix: array/keyArray removed (#6245) 2021-07-31 09:45:33 +01:00
ckohen
797727ab6e docs: update readme node version requirement (#6241) 2021-07-31 09:42:19 +01:00
Vlad Frangu
ee3cdc81dd chore(Deps): update discord-api-types to 0.21.0 (#6237) 2021-07-31 00:21:25 +01:00
Shino
d2757cf899 ci(PublishDev): change version number to be sequential (#6235) 2021-07-31 00:11:22 +01:00
ckohen
dbb59ba1b2 feat(Util): add SweptCollection for auto sweeping of caches (#6110)
Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
Co-authored-by: 1Computer1 <22125769+1Computer1@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: NotSugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Shino <shinotheshino@gmail.com>
Co-authored-by: SpaceEEC <24881032+SpaceEEC@users.noreply.github.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-07-30 22:57:46 +01:00
Jiralite
2675b0866c docs(GuildManager): Correct GuildCreateOptions typo (#6224) 2021-07-30 00:04:45 +01:00
monbrey
cc5f1ce75e docs(Constants): document the Constants object for enum-like usage (#6208)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-30 00:04:23 +01:00
ckohen
5f710ae559 refactor(Message): make thread a getter for accuracy (#6215)
* refactor(Message): make thread a getter for accuracy

* docs: reword info block
2021-07-30 00:04:05 +01:00
Jiralite
40b127ee1e docs(Guild): Correct GuildRolePosition typo (#6223) 2021-07-30 00:03:48 +01:00
Jiralite
d310e4fc28 docs(WelcomeChannel): Correct guild return type (#6222) 2021-07-29 12:29:01 +01:00
슈리튬
6b85f900fa fix(TextBasedChannel): Fix MessageCreate handling (#6217) 2021-07-29 11:55:37 +01:00
Kevin
105a194546 docs(Constants): fix StickerTypes typedef (#6218) 2021-07-29 11:53:38 +01:00
A1ex
f44bfc47c7 docs(MessageMentions): fix documentation for members property (#6206) 2021-07-29 11:53:23 +01:00
Jiralite
1009ce169b docs(Guild): Add GuildTextChannelResolvable type definition (#6221) 2021-07-29 11:53:02 +01:00
Jiralite
a69e2f7904 refactor: Match subcommand (group) name casing with Discord's (#6204) 2021-07-29 11:52:06 +01:00
GoldenAngel
4beb64769c chore(Integration): Cleanup removed methods (#6220) 2021-07-29 11:51:47 +01:00
Justin
e000af5c98 feat(WebhookClient): allow creation of clients via URLs (#6192) 2021-07-29 11:48:43 +01:00
SpaceEEC
42a0313034 fix(PermissionOverwrites): throw better error if resolving option fails (#6219) 2021-07-29 11:10:27 +01:00
Justin
be5c0eff34 chore: update discord domain name (#6214) 2021-07-29 02:54:08 +01:00
Scott Bucher
19b242ac10 feat(FetchRecommendedShardsOptions): account for large bot sharding (#6184)
Co-authored-by: Justin <justinleeong@gmail.com>
2021-07-29 02:52:51 +01:00
ckohen
4f1f32f2a5 types(WsEvents): add thread ws events (#6194) 2021-07-28 21:35:49 +01:00
ckohen
68725476b3 fix(Channel): add default for destructured options (#6203) 2021-07-28 21:31:59 +01:00
ckohen
26ba0e1036 feat(GuildAuditLogs): add threads (#6195) 2021-07-28 20:05:01 +01:00
Jiralite
f060a3fcd7 fix: Use string instead of Snowflake for invites (#6202) 2021-07-28 20:04:51 +01:00
Jiralite
5e433b5995 docs(InteractionResponses): Document missing properties (#6178) 2021-07-28 01:30:22 +01:00
ckohen
9679b90872 fix(ThreadChannel): better property handling (#6172) 2021-07-28 01:29:06 +01:00
IRONM00N
30a58dc801 fix: export various classes that are exported in the typings (#6166)
The following classes were exported in the typings but not the `index.js` file:
- `ApplicationCommandPermissionsManager`
- `CachedManager`
- `ClientVoiceManager`
- `DataManager`
- `GuildInviteManager`
- `StageInstanceManager`
- `VoiceStateManager`
- `WebSocketManager`
- `WebSocketShard`
- `AnonymousGuild`
- `GuildPreviewEmoji`
- `InviteStageInstance`
- `InviteGuild`
- `PartialGroupDMChannel`
- `StageInstance`
- `StickerPack`
- `Typing`
- `WelcomeChannel`
- `WelcomeScreen`
- `GuildAuditLogsEntry`
2021-07-27 11:15:49 +01:00
Advaith
b22272f860 feat(Guild): add fetchWidget() for getting widget data (#6180) 2021-07-27 11:15:31 +01:00
Advaith
2f1cc1fc27 feat(ApplicationCommandOptionType): add NUMBER (10) (#6128) 2021-07-27 11:12:43 +01:00
Tiemen
4886ae23ab refactor: only cache commands from own user (#6161) 2021-07-23 20:19:17 +01:00
Milo
4f8ca2936a fix(Typings): type attachments to InteractionUpdateOptions (#6162)
* fix(Typings): type attachments with never

* Update typings/index.d.ts

Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>

* chore(Typings): fix

* chore(Typings): add fetchReply

Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
2021-07-23 20:18:30 +01:00
Shino
690c121aa9 feat(CommandInteractionOptionResolver): add sub-command required option (#6165) 2021-07-23 20:17:34 +01:00
Jiralite
c8ca7bfd2c fix(GuildAuditLog): Assert target to null upon not finding invite codes (#6171) 2021-07-23 01:17:02 +01:00
ckohen
870a0de53c fix(Message): fix typo in sticker_items (#6173) 2021-07-22 22:55:47 +01:00
Jiralite
5e706941fc docs(CommandInteraction): Correct type definition of CommandInteractionOption (#6169) 2021-07-22 12:56:44 +01:00
ckohen
cd47a524af refactor(Message): combine patch methods (#6071) 2021-07-22 09:05:38 +01:00
Shino
328501bd8e refactor(CommandInteractionOptionResolver): add readonly data property (#6156) 2021-07-21 22:22:47 +01:00
Apokalypt
07017a9699 fix(Sticker): replace 'this.guildID' (undefined) by 'this.guildId' in fetchUser (#6160)
Co-authored-by: Apokalypt <enterprise@apokalypt.fr>
2021-07-21 08:39:17 +01:00
Apokalypt
85865058ed types(DataManager): add 'K' to type parameter of 'resolveId' (#6152)
Co-authored-by: Apokalypt <enterprise@apokalypt.fr>
2021-07-21 08:38:55 +01:00
Tristan Guichaoua
1e90be8f7a types(ColorResolvable): readonly tuple (#6153) 2021-07-20 20:20:37 +01:00
Jan
5addcd15d8 refactor(OptionResolver): accept single type instead of an array (#6154) 2021-07-20 20:20:20 +01:00
monbrey
02f55f0971 fix(CommandInteractionOptionResolver): type should be USER (#6148) 2021-07-20 01:46:38 +01:00
Floffah
8ccfd6e07b fix(CommandInteractionOptionResolver): Export CommandInteractionOptio… (#6146)
**Please describe the changes this PR makes and why it should be merged:**
CommandInteractionOptionResolver is exported in the typings, but not in the index.js file

**Status and versioning classification:**
 - Code changes have been tested against the Discord API, or there are no code changes
 - I know how to update typings and have done so, or typings don't need updating
2021-07-20 00:18:19 +01:00
Advaith
54d6a3a070 feat(Sticker): updates, sticker packs, and guild stickers (#5867)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: BannerBomb <BannerBomb55@gmail.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-07-20 00:17:21 +01:00
Vlad Frangu
76888e6c1b chore(Deps): update discord-api-types to 0.19.0 (#6147) 2021-07-20 00:15:42 +01:00
Shino
77784aca43 fix(CommandInteraction): change options type from Collection to array (#6139) 2021-07-19 08:02:53 +01:00
Devin
8ea04b295d Updates identity to correct scope name of identify (#6140) 2021-07-19 08:02:37 +01:00
DTrombett
63ce065fc3 refactor: change const enums to interfaces (#6078)
* types(*): revert const enum to enum

* refactor: change const enums to interfaces
2021-07-18 19:29:40 +01:00
GoldenAngel
9f039a8679 feat(GuildPreview): add createdAt & createdTimestamp (#6130)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-18 19:18:53 +01:00
eeehh
c40c0f934a fix(GuildChannel): only fetch invites for the specific channel (#6132) 2021-07-18 19:16:48 +01:00
Shino
f293132345 feat(CommandInteraction): add CommandInteractionOptionResolver (#6107)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-07-18 19:16:32 +01:00
HyRo
4d53d0fd11 refactor(ActionsManager): less complex code (#6102)
Co-authored-by: Matt (IPv4) Cowley <me@mattcowley.co.uk>
Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: Gabe616 <60316309+Gabe616@users.noreply.github.com>
2021-07-17 12:25:59 +01:00
Advaith
366f3c910a feat: make Instance#fetch force true by default, and fix force parameter (#6116)
Co-authored-by: Almeida <almeidx@pm.me>
2021-07-17 12:25:23 +01:00
Antonio Román
ef5ba05996 types(Message): mark #thread as nullable (#6129) 2021-07-17 12:25:05 +01:00
Alan
de384047b3 chore(ApiRequest): remove mention of var (#6125)
Co-authored-by: Alan <you@example.comalanlichen1@gmail.com>
2021-07-17 12:22:45 +01:00
Antonio Román
5ca97c9351 refactor: remove timer utilities from Client (#6113) 2021-07-16 13:31:25 +01:00
Joey Smalen
f200f14a40 feat(REST): append additional information to the required User Agent (#6112)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-07-16 12:27:12 +01:00
DTrombett
8db6df3d1e types(Options): add types for cacheWithLimits (#6095) 2021-07-16 12:20:38 +01:00
Antonio Román
576eee8de2 refactor: remove typing caching (#6114)
Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
2021-07-16 12:20:05 +01:00
Shino
4206e35b23 feat(Client): add conditional ready typings (#6073) 2021-07-14 16:19:38 +01:00
DTrombett
60148c6a78 types(Interaction): change inGuild return type (#6094) 2021-07-14 16:14:20 +01:00
Bluenix
a9e7ebd94f types(PartialWebhookFields): add APIMessage to deleteMessage union (#6085) 2021-07-14 16:13:32 +01:00
Hackerboi 69
98c60789a2 types(Interactions): fix function overloads (#6109) 2021-07-13 13:31:55 +01:00
monbrey
1dcad051a8 revert: support for nested arrays of components, fix error handling (#6081) 2021-07-12 07:53:27 +01:00
Matt (IPv4) Cowley
dee5c83fc0 fix(PermissionsOverwrites): only convert type if number (#6092) 2021-07-12 07:53:18 +01:00
Tiemen
a8984bc68c types(Guild): remove fetchVoiceRegions (#6099) 2021-07-11 23:58:16 +01:00
Rodry
d433fe8a08 fix: channel type check in actions (#6086) 2021-07-10 21:51:32 +01:00
SpaceEEC
f72ce7c136 fix(GuildChannel): clone its PermissionOverwriteManager too (#6083) 2021-07-10 13:15:20 +01:00
DTrombett
d6c43a50bd types(Partial): add partial reactions (#6066)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-09 12:25:59 +01:00
iCrawl
5b6be0cebc types(Test): fix overloads for channel create 2021-07-08 22:46:26 +02:00
SpaceEEC
637c8e0fdf fix(PresenceUpdate): use added presence over nullable getter (#6077)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-08 21:43:48 +01:00
Rodry
6301728d35 refactor(Channel): change channel types to UPPER_CASE (#6035) 2021-07-08 21:32:19 +01:00
anandre
b170fb5ce8 docs(InteractionResponses): reply docs example (#6079)
Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
2021-07-08 21:16:03 +01:00
BaumianerNiklas
67e9ce4693 docs(InteractionResponses): generalize wording in update to fit other component interaction types (#6074) 2021-07-08 15:39:36 +01:00
BannerBomb
c1eaa78ab7 typings(GuildInviteManager): FetchInvitesOptions (#6076) 2021-07-08 15:39:23 +01:00
1Computer1
9cd5e7ed61 refactor(Managers): rename add to _add (#6060) 2021-07-08 11:34:45 +01:00
DTrombett
28b5ffb4d6 docs(ClientUser): fix shardId nullable (#6072)
* docs(ClientUser): fix shardId nullable

* docs(ClientUser): fix id lowercase for consistency

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

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-07-07 23:22:51 +01:00
Antonio Román
7322547172 types: fixed unreachable overloads (#6062) 2021-07-07 17:34:39 +01:00
DTrombett
58bbcd591e types(ApplicationCommand): fix option name (#6067)
* types(ApplicationCommand): fix option name

* fix(ApplicationCommand): update tests

* fix(ApplicationCommand): fix error param
2021-07-07 13:41:47 +01:00
Antonio Román
98a5b52d8b refactor(ApplicationCommandManager): remove unused assignment (#6063) 2021-07-07 13:41:02 +01:00
Antonio Román
4eb3a2a885 refactor: rename Constants.OPCode to Opcode, moved objects to enums (#6065) 2021-07-07 13:40:36 +01:00
ckohen
755c180659 feat: allow channels from uncached guilds to be returned from fetch (#6034)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-07-06 13:04:26 +01:00
Rodry
2e078e4488 types(*): revert incorrect unknown type changes (#6057)
Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
2021-07-05 22:49:34 +01:00
Jan
c0a814fdb3 feat(Collector): better types for events (#6058)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-07-05 22:26:15 +01:00
BannerBomb
4c0426c469 docs: fixed several typings and MessagePayload#create JSDoc (#6059) 2021-07-05 22:26:06 +01:00
SpaceEEC
ded93feb57 refactor(PresenceManager): have Presence extend Base and simplify add (#6056)
* refactor(PresenceManager): have Presence extend Base and simplify add

* style(Presence): add empty line after super call

Co-authored-by: Noel <buechler.noel@outlook.com>

Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-05 19:53:15 +01:00
SpaceEEC
afbd5db404 refactor(Presences): remove from User, nullable on GuildMember (#6055)
as well as on Client#presenceUpdate
2021-07-05 19:53:00 +01:00
Shubham Parihar
8d9ab741c8 docs(ThreadChannel): fix documentation for setLocked method (#6053) 2021-07-05 18:36:25 +01:00
iAmZiNc
162d89a42f fix(Presence) missing client property definition (#6054) 2021-07-05 18:03:07 +01:00
Almeida
93e2c04ec2 fix(InviteScope): added missing 'bot' scope (#6052) 2021-07-05 16:07:57 +01:00
Antonio Román
03fe6ee4e4 test(Types): add notPropertyOf type-only utility (#6051) 2021-07-05 16:07:45 +01:00
Souji
3022b0f5b1 refactor(Intents): remove computed shorts (#6050) 2021-07-05 16:07:30 +01:00
PanSzelescik
28c57246d1 feat(Message): add 'failIfNotExists' to ClientOptions (#6038)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-05 13:53:40 +01:00
PanSzelescik
31d31293d3 feat(LimitedCollection): export LimitedCollection (#6043)
* feat(LimitedCollection): export LimitedCollection

* fix: remove @private

* fix: typings
2021-07-05 13:53:15 +01:00
monbrey
34708d6d18 fix(SelectMenuInteraction): set values to empty array if not provided (#6045) 2021-07-05 13:39:21 +01:00
Antonio Román
1a27f57950 refactor: remove lastMessage properties from User and GuildMember (#6046) 2021-07-05 13:11:13 +01:00
Jan
676118ab0f refactor(typings): general cleanup (#6047) 2021-07-05 12:55:06 +01:00
monbrey
e3d877d542 fix(Guild): add invite manager property, extend CachedManager (#6049)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-05 12:16:34 +01:00
BannerBomb
fe5d56c9b1 fix(TeamMember): Fixed incorrect return types. (#6044) 2021-07-04 22:55:00 +01:00
monbrey
c6e5521687 feat(Client): enforce passing scopes to generateInvite (#6024)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-04 22:53:57 +01:00
DraftMan
9e08b02df2 feat(Managers): Add GuildInviteManager (#5889)
Co-authored-by: iShibi <shubhamparihar391@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <SpaceEEC@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: iCrawl <icrawltogo@gmail.com>
2021-07-04 22:53:13 +01:00
BannerBomb
c4aa9feee2 types(Options): should extend null (#6042)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-07-04 22:05:16 +01:00
Antonio Román
185e37602b types(Voice): move types to the library's definitions (#6041)
* types(Voice): move types to d.js

* types: added padding lines

Co-authored-by: Noel <buechler.noel@outlook.com>

Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-04 21:10:33 +01:00
Antonio Román
a7c6678c72 refactor: change xID to xId (#6036)
* refactor: change `xID` to `xId`

* Update src/managers/MessageManager.js

Co-authored-by: Noel <buechler.noel@outlook.com>

Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-04 19:54:27 +01:00
didinele
281072be44 chore: remove unnecessary getter (#6037) 2021-07-04 15:59:28 +01:00
1Computer1
ab0b3b9a07 fix(Structures): remove Structures (#6027) 2021-07-04 12:26:35 +01:00
Shubham Parihar
db60e367b4 docs(MessageManager): document options param for #edit as required (#6031) 2021-07-04 12:25:59 +01:00
ckohen
2ab32e6bc6 types: better fullPermissions typings (#6028) 2021-07-04 12:25:42 +01:00
ckohen
b62d646271 docs: add Partial typedef (#6029) 2021-07-04 12:25:35 +01:00
Shubham Parihar
d58f0d243c fix(GuildChannel): use map method on cache not its manager (#6032) 2021-07-04 12:25:28 +01:00
monbrey
610b0b4dd6 docs: fix some missed MessageComponent collector methods (#6023) 2021-07-04 00:27:07 +01:00
monbrey
8077e4f4f1 fix(PermissionOverwriteManager): pass ID to API correctly (#6026) 2021-07-04 00:26:44 +01:00
1Computer1
8c7cb0eff8 feat(Managers): add customizable caching for managers (#6013) 2021-07-04 00:26:26 +01:00
Almeida
ec06ba7ad0 docs(*): wrap optional properties with union types in parentheses (#6021) 2021-07-03 21:00:53 +01:00
Shubham Parihar
4bf49809f2 refactor: improve typings and docs related to threads (#5991)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-03 20:38:38 +01:00
SkyFlags
7e3001191c fix(GuildChannel): Add missing 'cache' property (#6019) 2021-07-03 19:59:52 +01:00
Vlad Frangu
39db95352c fix: Remove connection.url from open debug message (#6018) 2021-07-03 18:44:48 +01:00
monbrey
374c779f7f feat(InteractionCollector): reworked to be more generic (#5999)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-03 13:35:39 +01:00
DTrombett
bd25ff5913 fix(Util): splitMessage not working with array (#6008)
Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
2021-07-03 13:25:43 +01:00
Antonio Román
2446ff5251 refactor(Util): make class extend null (#6000) 2021-07-03 13:25:35 +01:00
Ishmaam Khan
e7ad2fe207 feat: PermissionOverwriteManager (#5318)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-07-03 13:24:38 +01:00
Antonio Román
a11a10525b refactor: rename events to be consistent with WS names (#6010)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-03 13:23:53 +01:00
SpaceEEC
7dd1a8da08 docs(Collector): properly document endReason (#6016) 2021-07-03 13:23:15 +01:00
ckohen
568691ce6a fix: correct permissions checks and cache on update (#6015) 2021-07-03 13:23:01 +01:00
Rodry
4adfc45b5a docs(CreateInviteOptions): fix TargetType link (#6017) 2021-07-03 13:22:35 +01:00
Antonio Román
98e45a5995 feat(Formatters): added new URL utilities and docs (#6014)
* feat(Formatters): added new URL utilities and docs

* refactor: use static class to fix docsgen error

* fix(Typings): declare members as public

* docs(Formatters): add method tags

* docs: remove empty line

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

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-03 13:22:20 +01:00
Rodry
56b5b7ee82 types(MessageOptions): fix components being optional (#6005) 2021-07-03 08:58:29 +01:00
DTrombett
0dc5dd5808 types(*): create mention types (#6003) 2021-07-03 08:58:18 +01:00
Pravesh Kunwar
1242c5434d types(VoiceState): fix optional params (#5993) 2021-07-03 08:57:41 +01:00
BannerBomb
c40b06cac9 types(ClientUser): updated setAFK signature (#6011) 2021-07-03 08:57:31 +01:00
Tobias Peltzer
e4be666c2c fix(ThreadManager): fixed wrong private and fetchAll check (#6012) 2021-07-03 08:56:35 +01:00
Adrian Paschkowski
3a718d8c62 fix(Typings): Improve components typings in MessageEditOptions (#6002) 2021-07-02 19:54:13 +01:00
Antonio Román
27e217caee chore(Constants): added new error codes (#5975) 2021-07-02 19:53:48 +01:00
Rodry
fbdad6eac3 docs(*): add class links to isX() methods (#6007) 2021-07-02 19:51:59 +01:00
kikorp78
fe6cc0c15d types(MessageSelectMenu): fix typings (#5995) 2021-07-02 00:44:05 +01:00
BannerBomb
726073fef7 docs: WebSocketShard#send and TextBasedChannel#send (#5998) 2021-07-02 00:42:11 +01:00
Antonio Román
1e73c25fbf feat(RoleManager): added edit method, alias Role#edit (#5983)
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
2021-07-01 22:32:03 +01:00
DTrombett
d742814686 docs(Util): methods removed on the base object (#5990) 2021-07-01 17:38:52 +01:00
Rodry
d078dce2f8 ci: deprecate old dev releases on publish (#5992)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-01 17:37:32 +01:00
Hackerboi 69
521d26c57f types(Interactions): fix function overload types (#5989) 2021-07-01 17:37:25 +01:00
Adrian Castro
6edf55c04b fix(ApplicationCommand): fix typo in JSDoc (#5994) 2021-07-01 17:35:10 +01:00
monbrey
941cd86881 types: few missing thread channels (#5988) 2021-07-01 10:01:14 +01:00
monbrey
0eeb2775a5 types(MessageOptions): improved component typings (#5987) 2021-07-01 10:00:33 +01:00
Rodry
58183d425b docs(Partials): add link to the guide (#5982) 2021-07-01 09:58:27 +01:00
monbrey
9ac68670d7 fix(ThreadChannel): check for existence of properties when patching (#5961)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-07-01 09:58:20 +01:00
Shubham Parihar
71fb33a5fe feat(StageChannel): add createStageInstance method & use better naming convention (#5951)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-07-01 09:58:11 +01:00
ckohen
388e05b4af types(ApplicationCommandPermissionsManager): fix types (#5979) 2021-07-01 09:58:01 +01:00
Rodry
f819416bac docs(MessageSelectMenu): add link to Discord docs (#5984) 2021-07-01 09:57:25 +01:00
DTrombett
a08ce7dddb types(ThreadChannel): make locked and archived param optional (#5980) 2021-06-30 23:45:59 +01:00
Sugden
1e8f01253e refactor: new node features (#5132)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-30 21:40:33 +01:00
Shubham Parihar
f108746c15 docs(ThreadManager): fix FetchedThreads typedef and startMessage (#5971) 2021-06-30 17:20:01 +01:00
Shubham Parihar
b7ed6752ac feat(Channel): add isThread typeguard for better TS support (#5978) 2021-06-30 16:19:59 +01:00
Rodry
788d58e5a3 types(*): make hex color types compatible with ColorResolvable (#5973)
* types(*): make hex color types compatible with ColorResolvable

* types(*): create HexColorString type

* types(HexColorString): move to a less awkward place
2021-06-30 14:32:14 +01:00
iCrawl
64f093f9c4 chore: deps 2021-06-30 13:05:02 +02:00
Antonio Román
8c7a28f211 feat(Util): added formatters (#5976) 2021-06-30 09:50:31 +01:00
A1ex
58bc1458d0 docs(Message): Add ThreadChannel as a channel type (#5972) 2021-06-30 06:24:37 +01:00
Mark Fisher
ae37d202a5 types(CommandInteraction): Readd followUp type (#5974) 2021-06-30 06:21:24 +01:00
iCrawl
5842e35881 fix(Typings): erronous RawMessage 2021-06-29 23:38:23 +02:00
monbrey
5e28ff83cb feat(Interactions): option to auto-fetch replies (#5831) 2021-06-29 22:32:33 +01:00
Shubham Parihar
5dfd7dd1bf docs(ThreadManager): fix reason prop of ThreadCreateOptions (#5970) 2021-06-29 22:31:26 +01:00
Jake Ward
3174507d57 types(ThreadManager): add type to ThreadManager#create options (#5969) 2021-06-29 21:03:15 +01:00
DTrombett
edab5afff9 fix(Thread): make archive_timestamp not nullable (#5965) 2021-06-29 20:41:21 +01:00
Antonio Román
1925d01d8f fix(Sharding): strict type context and return (#5933) 2021-06-29 20:36:04 +01:00
Papageorgiadis Savvas
87e8cdd3eb feat(Interaction): add guild guard (#5955)
* feat(Interaction): add guild guard

* fix: remove possibly uncached getters & duplicate method

* fix: boolean ensuring

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-06-29 20:35:52 +01:00
Rodry
706c6eae60 ci: add UNIX timestamp to version number (#5967)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-06-29 20:27:47 +01:00
Shubham Parihar
853be621ac docs(Channel): fix description of thread channel types (#5968) 2021-06-29 20:27:20 +01:00
ckohen
6264c60e97 feat(Managers): new ApplicationCommandPermissionsManager (#5897)
Co-authored-by: SpaceEEC <24881032+SpaceEEC@users.noreply.github.com>
Co-authored-by: Yoshida Tomio <mail@tomio.codes>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-06-29 19:19:48 +01:00
ckohen
bbc48fdad6 chore(Threads): general fixup and catch up on features (#5959)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-06-29 18:58:51 +01:00
Amish Shah
63a8df1c1f chore(Types): include @discordjs/voice typings (#5941)
Co-authored-by: Noel <buechler.noel@outlook.com>
2021-06-29 18:44:45 +01:00
BannerBomb
5ad83a6a65 fix(Webhook): return void from #delete for consistency. (#5954) 2021-06-29 13:25:01 +01:00
BannerBomb
fb8d5166a8 refactor(Presence): remove second assignment of syncID (#5956) 2021-06-29 11:50:51 +01:00
Antonio Román
acdcb906ae types(ColorResolvable): change string to #${string} (#5950) 2021-06-29 00:42:54 +01:00
Jan
6c447b12e3 fix(Collector): docs and types (#5937) 2021-06-29 00:37:45 +01:00
monbrey
41f718f779 docs: drop string from MessageButtonStyleResolvable (#5944) 2021-06-29 00:37:38 +01:00
Peter Maguire
d38b34756b docs(Features): resolved typo in FATEWAY_PRESENCE_LIMITED (#5952)
* Fix documentation typo

* Update index.d.ts
2021-06-29 00:34:43 +01:00
BaumianerNiklas
d3d19ce49b docs(Webhook): fix thread example in send method (#5953) 2021-06-29 00:34:30 +01:00
monbrey
e37ef3af21 types: define ApplicationCommand enums in lib (#5947) 2021-06-28 12:00:07 +01:00
DraftMan
0a0630c049 revert(BitField): Bring back-compatibility after BitField serialization (#5910) 2021-06-28 11:54:14 +01:00
SkyFlags
dc671c8ac4 fix(Message): Make author of referenced message nullable (#5929) 2021-06-28 11:53:53 +01:00
monbrey
03d3a5cdde types: fix remaining Raw type references, update discord-api-types dep (#5942) 2021-06-27 22:48:11 +01:00
monbrey
b15d825bb3 refactor(MessagePayload): rename APIMessage (#5921) 2021-06-27 12:47:15 +01:00
SpaceEEC
630432b4e2 docs(Channel): make the type news_thread an inline code-block (#5940) 2021-06-27 12:46:37 +01:00
Rodry
e44ae96100 fix(User): fix bot and system properties being incorrect in some cases (#5923) 2021-06-27 12:46:24 +01:00
Antonio Román
985d4d6a43 refactor: removed code and split options (#5918)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>

BREAKING CHANGE: Removed `APIMessage#split`
BREAKING CHANGE: Removed `MessageEditOptions#code`
BREAKING CHANGE: Removed `BaseMessageOptions#code`
BREAKING CHANGE: Removed `BaseMessageOptions#split`
2021-06-26 23:11:40 +01:00
Jan
0d0c8f07f2 refactor(Collector): make filter an option (#5903)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-26 10:57:06 +01:00
monbrey
1439183ad3 feat(MessageComponentInteraction): component getter (#5840)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-06-26 10:55:37 +01:00
Jake Ward
adecead716 fix(ThreadMemberManager): fix ThreadMemberManager#add and ThreadMemberManager#fetch (#5927) 2021-06-26 10:54:37 +01:00
ckohen
6065b11634 types(ThreadMemberManager): fix incorrect usage (#5928) 2021-06-26 10:54:23 +01:00
SpaceEEC
4714a961b8 fix(Webhook): resolve non-string avatars too (#5914) 2021-06-25 11:11:56 +01:00
Jan
261612596d feat(MessageMentions): add repliedUser (#5905) 2021-06-25 11:07:31 +01:00
Rodry
5af2ef5fbc docs(Thread): add links to discord api docs (#5919) 2021-06-25 00:34:10 +01:00
monbrey
75837a8252 docs(MessageSelectMenu): fix options typings (#5922) 2021-06-25 00:33:58 +01:00
monbrey
e5fcf0bee5 feat(MessageSelectMenu): droppybois (#5692)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-24 22:25:16 +01:00
BannerBomb
d984ac9d09 Fixed typos from commit #5570 (#5917) 2021-06-24 22:20:57 +01:00
monbrey
ca2a36b1d7 fix(ApplicationCommand): stringType isn't supposed to be sent to the API (#5916) 2021-06-24 21:57:11 +01:00
ckohen
7346621d15 feat: api v9 and threads (#5570)
Co-authored-by: Noel <icrawltogo@gmail.com>
Co-authored-by: Amish Shah <dev@shah.gg>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SynthGhost <60333233+synthghost@users.noreply.github.com>
Co-authored-by: SpaceEEC <24881032+SpaceEEC@users.noreply.github.com>
Co-authored-by: Elliot <elliot@maisl.fr>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-06-24 20:48:29 +01:00
monbrey
ea49f7ca74 feat(InteractionCreate): move to an Action handler (#5906) 2021-06-24 20:42:56 +01:00
SpaceEEC
ee025b0558 fix(Permissions): allow admin to override in the missing method (#5911) 2021-06-24 20:42:40 +01:00
Rodry
e0efcc6ab0 docs(*): add links to Discord's API objects & data (#5862) 2021-06-24 09:55:44 +01:00
Pronin Egor
6d3d00b445 fix(InteractionResponses): set replied status on editReply (#5899)
Co-authored-by: Noel <buechler.noel@outlook.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-06-24 00:07:33 +01:00
Shubham Parihar
d930c812bb feat: add missing APIError codes (#5898) 2021-06-24 00:04:55 +01:00
monbrey
bd9f56af9a feat(Interactions): improve error handling for ephemeral responses (#5892)
Co-authored-by: muchnameless <12682826+muchnameless@users.noreply.github.com>
2021-06-24 00:03:52 +01:00
monbrey
2d7c12b0e9 fix(Message): flags not being parsed on some edits (#5886)
* fix(Message): flags not being parsed on some edits

* refactor(MessageManager): access cache once
2021-06-24 00:02:30 +01:00
Jan
1816a93b1b refactor: remove exported shortcuts to util methods (#5904) 2021-06-23 10:47:17 +01:00
Shubham Parihar
6cebeae15e docs: move embeds field into BaseMessageOptions (#5902) 2021-06-22 15:25:18 +01:00
Antonio Román
edf6f0ca70 docs(Readme): remove dependencies badge (#5901) 2021-06-22 11:09:23 +01:00
Brage
3d96a33bd0 docs(AnonymousGuild): add missing extends tag (#5896) 2021-06-22 10:24:04 +01:00
Shubham Parihar
c850ae1027 feat: add APIError codes for stage instance (#5888) 2021-06-20 15:48:02 +01:00
ckohen
174b7a7f9c fix(Guild): don't patch before instance properties (#5885)
Co-authored-by: BannerBomb <BannerBomb55@gmail.com>
2021-06-20 15:47:30 +01:00
Jacob Morrison
1f8f3ab0f8 fix(presenceUpdate): fire when only state/details change on an activity (#5846) 2021-06-19 17:27:54 +01:00
Souji
44e2ee7b20 feat(WelcomeScreen): welcome screens (#5490)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-06-19 16:44:45 +01:00
Brage
807ea2d3c1 docs(VoiceState): channel can be null (#5872)
The docs does not show that VoiceState#channel can be null
![Docs Image](https://i.imgur.com/fLqRBqm.png)
This should fix the issue
2021-06-18 16:37:57 +01:00
Tyler Resch
e3ed74a5e8 docs(ReplyMessageOptions,MessageEditOptions): replaced embed with embeds (#5860)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-18 14:42:53 +01:00
Shubham Parihar
2d12db000f feat: stage instance invite (#5856)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-18 00:01:18 +01:00
Shubham Parihar
a3cbcca13d feat(Guild): add enum for premium_tier (#5868) 2021-06-16 15:33:01 +01:00
monbrey
a0b7d95e36 types(MessageReactionResolvable): add string (#5863) 2021-06-16 10:29:14 +01:00
Antonio Román
6cceb936a7 refactor(Package): remove runkitExampleFilename (#5866) 2021-06-16 10:29:02 +01:00
Shubham Parihar
f7eeccba4b feat(*): use enums for consistency and speed (#5843)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-15 12:33:31 +01:00
Rodry
671436cbb8 fix(Message): editedTimestamp defaulting to 0 (#5847) 2021-06-15 12:02:56 +01:00
monbrey
9dda9b742f refactor(awaitMessageComponentInteraction): use options object for lib consistency (#5852) 2021-06-15 12:02:48 +01:00
Jiralite
96a4e7b86e docs: Consistent application name usage (#5853) 2021-06-15 12:02:39 +01:00
ThumusLive
038ee99604 feat(Widget): wrapper for widget.json (#5619)
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
Co-authored-by: BannerBomb <BannerBomb55@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-06-15 12:02:18 +01:00
Tyler Resch
a6dae75d3a docs(TextBasedChannel#send): update embeds example (#5857) 2021-06-15 11:59:53 +01:00
Shubham Parihar
918921e821 feat: stage instances (#5749)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-14 12:57:37 +01:00
muchnameless
a1f94f670e fix(ApplicationCommand): default option.required fix (#5848) 2021-06-14 08:10:05 +01:00
Shubham Parihar
1ac9a2eb5b refactor(*): make typedefs for all options params (#5785)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-06-13 19:32:54 +01:00
monbrey
01a1fd615b fix(Guild): setChannelPositions null parenting (#5841) 2021-06-13 19:31:06 +01:00
Rodry
77c1f15c9f fix(ApplicationCommand): default option.required to false (#5838) 2021-06-13 19:31:00 +01:00
Papageorgiadis Savvas
d5bb7585da types(GuildApplicationCommandManager): allow undefined command (#5837)
Co-authored-by: Almeida <almeidx@pm.me>
2021-06-13 19:30:34 +01:00
Almeida
a0a56e2cb3 types: corrected shard broadcastEval (#5834) 2021-06-13 19:30:28 +01:00
Jan
4dbcaf76c3 refactor(GuildPreviewEmoji): make roles an array (#5720) 2021-06-13 19:30:20 +01:00
Jan
02693bc02f refactor(APIMessage): remove unused declarations (#5836) 2021-06-12 12:11:57 +01:00
monbrey
9376ee42f4 docs(ButtonInteraction): fix typo (#5835) 2021-06-12 12:11:48 +01:00
ckohen
7111b4cd5f refactor: fetch options consistency (#5824) 2021-06-12 12:10:35 +01:00
monbrey
08cffd6a30 types(MessageComponentInteraction): update should return Promise<void> (#5829) 2021-06-12 12:10:24 +01:00
Shubham Parihar
29173bf814 fix(GuildManager): #create throws when systemChannelFlags is undefined (#5832) 2021-06-12 12:10:13 +01:00
Matt (IPv4) Cowley
c5859337b6 fix(GuildChannel): don't force parentID/permissionOverwrites to empty on create (#5823) 2021-06-12 12:10:01 +01:00
Adrian Castro
99ff715137 feat(*): document and support embeds field in message create endpoint (#5792)
Co-authored-by: ckohen <chaikohen@gmail.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-06-11 23:45:17 +01:00
Matt (IPv4) Cowley
6df36232a0 fix(GuildChannel): improve empty overwrite handling for permissionsLocked (#5821) 2021-06-11 23:45:05 +01:00
Antonio Román
9e5106d90e docs: removed topics and FAQ from the repository (#5820)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: ckohen <chaikohen@gmail.com>
2021-06-11 23:41:49 +01:00
ckohen
24e5868818 fix(ApplicationCommands): allow managing commands for uncached guilds (#5729)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-11 23:26:24 +01:00
Jan
e990c35476 fix(ClientApplication): freeze flags (#5811) 2021-06-11 23:22:10 +01:00
Shubham Parihar
a5a6e22316 fix(*): typedefs and typings for image & webhook options (#5805) 2021-06-11 23:22:01 +01:00
SpaceEEC
19d0405aa5 refactor(GuildChannel): use Permissions.defaultBit over 0n (#5822) 2021-06-11 23:21:51 +01:00
Antonio Román
fdef940127 refactor: remove all voice code (#5818)
* refactor: remove all voice code

* refactor: remove even more remnants
2021-06-11 23:21:34 +01:00
Almeida
93b0a4e005 fix(TextBasedChannel): allow passing an APIMessage with split (#5815)
* fix(TextBasedChannel): allow passing an APIMessage with split

* fix(Webhook): allow passing an APIMessage with slit
2021-06-11 22:54:29 +01:00
Ratul Saha
19fd1622f5 types(Extendable): add ButtonInteraction (#5802) 2021-06-11 22:54:00 +01:00
Jan
e3e466d3e5 refactor(MessageEmbed): remove files (#5813)
* refactor(MessageEmbed): remove files

* fix: test
2021-06-11 21:36:31 +01:00
Juruel Keanu Lorenzo
a7ebb2145c fix(PermissionOverwrites): optional allow/deny OverwriteData (#5810) 2021-06-11 21:31:11 +01:00
Adrian Paschkowski
935f819207 fix(Typings): Fix BitField toJSON/valueOf return types (#5806) 2021-06-11 21:30:58 +01:00
Almeida
5fb6c0dd14 chore(npm): ignore unnecessary files (#5816)
* chore(npm): ignore unnecessary files

* use package#files instead of npmignore
2021-06-11 21:30:34 +01:00
Antonio Román
55ad6f0e23 docs(README): re-add install command, remove voice remnants (#5817) 2021-06-11 21:30:09 +01:00
Jan
77e28cf65b fix(Hooks): make husky hooks executable (#5812) 2021-06-11 17:18:05 +01:00
Mark Fisher
41673b7382 fix(GuildChannel): clone errors when options.name isn't provided (#5804) 2021-06-11 11:04:45 +01:00
SpaceEEC
53d8e49dca fix(WebSocketShard): don't catch errors thrown in event handlers (#5803) 2021-06-11 10:46:14 +01:00
Tyler Resch
f5f3f77286 docs(MessageEmbed): deprecation advisory for type (#5774)
Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-06-10 19:35:35 +01:00
SpaceEEC
097c7b9cdd fix: don't patch missing properties from partial payloads (#5796)
* fix: don't patch missing properties from partial payloads

* fix(GuildChannel): initialize permissionOverwrites in the constructor

* refactor(GuildChannel): remove redundant if
2021-06-10 17:42:45 +01:00
Shubham Parihar
ffabec3a5e feat(Guild): add enum for mfa_level (#5797) 2021-06-10 17:19:08 +01:00
SpaceEEC
2f5424bdac fix(GuildChannel): spread clone options to avoid infinite recursion (#5800) 2021-06-10 17:07:12 +01:00
SpaceEEC
18ac72e457 feat(RequestHandler): emit more info when a rate limit was hit (#5801)
* feat(RequestHandler): emit more info when a rate limit was hit

* emit 'None' when no sublimit was hit

Co-authored-by: Antonio Román <kyradiscord@gmail.com>

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-10 17:06:11 +01:00
SpaceEEC
eb98e33a85 fix(Webhook): throw an error if no token is available when it's required (#5798) 2021-06-10 17:05:45 +01:00
Shubham Parihar
e0ab836b2d feat: add new APIErrors (#5794) 2021-06-10 17:05:37 +01:00
SpaceEEC
ea0e06f980 fix(ClientPresence): produce valid activities for set presences (#5799) 2021-06-10 17:05:27 +01:00
SpaceEEC
68f7aebcaf fix(BitField): ensure missing returns an array of strings (#5795) 2021-06-10 17:05:17 +01:00
Souji
a1f763ee75 refactor(Guild): remove region from guild and manager methods (#5766) 2021-06-10 15:09:57 +01:00
u9g
fbcbb29884 feat(Util): allow array for StringOptions' char (#5566)
Co-authored-by: Voltrex <62040526+VoltrexMaster@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-06-10 10:24:45 +01:00
Shubham Parihar
eb0291d9a5 feat(GuildAuditLogs): make #target a channel for channel related logs (#5781)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-10 10:24:36 +01:00
ckohen
35781597d0 fix(ApiMessage): only pass objects as options directly (#5793)
* fix(ApiMessage): only pass objects as options directly

* refactor: inline if with ternary
2021-06-10 08:41:01 +01:00
Austrian
35c2225f50 docs(Messages): fix examples in messages after changes in #5758 (#5791) 2021-06-09 19:33:07 +01:00
Jiralite
4511624e79 docs(ApplicationCommand): Typos in ApplicationCommandPermissionData (#5789) 2021-06-09 19:32:49 +01:00
Amish Shah
c6aeebb18d feat(Sharding*): contexts for broadcastEval (#5756)
* feat(ShardClientUtil): add parameterList to broadcastEval

* feat(ShardingManager): add parameterList to broadcastEval

* chore: update typings

* refactor(Sharding*): use BroadcastEvalOptions

* chore: update typings

* docs: use serializable instead of stringifiable

* refactor: don't set broadcastEval default context

Co-authored-by: Antonio Román <kyradiscord@gmail.com>

* chore: fix inaccuracy in typings

* refactor(Sharding*): remove string-based broadcastEval

* fix(ShardingManager): incorrect usage of _broadcastEvalRaw

* refactor(ShardingManager): remove unnecessary method

* refactor(Sharding*): type check the eval script

* fix(ShardingManager): return Promise rejection rather than throwing an error

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

* chore: fix typings

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

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-09 18:14:33 +01:00
Amish Shah
7b2e12b102 feat(Voice): implement support for @discordjs/voice (#5402) 2021-06-09 14:21:19 +01:00
monbrey
c4f1c75efa feat: general component improvements (#5787) 2021-06-09 13:59:12 +01:00
Kevin
0156f693e0 fix(BitField): throw an error if bit to resolve is undefined (#5565)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-06-09 13:56:40 +01:00
Jan
0139e102e3 docs(GuildMemberManager): fix docs for #search() (#5784) 2021-06-09 13:15:53 +01:00
Ishmaam Khan
e798fb720e feat(GuildChannelManager): add 'fetch' method (#4966)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Avocado <43632131+Awoocado@users.noreply.github.com>
2021-06-09 13:12:33 +01:00
Adrian Castro
0467a9075f refactor: enforce single param on sending/editing methods (#5758)
Co-authored-by: ckohen <chaikohen@gmail.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-09 13:12:16 +01:00
Adam Gauthier
dda5ee2e9f refactor: guildAvailable, typingStop from Constants (#4861)
Both of these events no longer exist and should not be exposed in
Constants. Typings have been adjusted to correspond to Constants.Events.
2021-06-09 10:43:57 +01:00
Jan
ae78a336e1 fix: remove remnants of awaitMessageComponentInteractions (#5783) 2021-06-09 08:45:34 +01:00
Ven
16f261e773 feat(Rest): optional ratelimit errors (#5659)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-09 08:45:04 +01:00
monbrey
c2b3ed09a0 feat: promisified single interaction collection (#5770) 2021-06-08 20:52:27 +01:00
Kevin
32d8c8ba94 docs: CommandInteraction#channelID is type of Snowflake (#5776) 2021-06-08 14:16:37 +01:00
Nordiago
84e5b075b4 refactor(Interactions): move Structures import out of switch block (#5763) 2021-06-08 14:16:05 +01:00
Shubham Parihar
e980948de5 fix(*): add missing imports for custom errors (#5767) 2021-06-07 13:09:43 +01:00
meister03
d1c5b6fe9e fix(ShardingManager): client error event cannot be emitted (#5559)
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-06-07 13:09:23 +01:00
Souji
65dc00f321 feat(Message): applicationID for interaction responses (#5765) 2021-06-07 09:58:38 +01:00
Souji
bf191df9c0 feat(Client): make use of with_expiration in #fetchInvite (#5764) 2021-06-07 09:58:26 +01:00
Shubham Parihar
4567cd4ca2 docs(InteractionDeferOptions): correctly define the typedef (#5769) 2021-06-07 09:33:12 +01:00
monbrey
657635c1c0 fix: add components to MessageOption typedefs (#5768) 2021-06-07 09:32:50 +01:00
ckohen
dec191aa1e feat(Interactions): add InteractionWebhook for better internals (#5712) 2021-06-06 00:41:23 +01:00
Rodry
1d57754d46 fix(Interaction): add missing types and fix docs lists (#5762)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-05 21:05:27 +01:00
Shubham Parihar
2901fd595b fix(Webhook): #editMessage throws error when content is null (#5757) 2021-06-05 20:26:12 +01:00
SpaceEEC
f0dad26a5b fix(MessageComponentInteraction): correctly type defer method (#5760) 2021-06-05 20:25:39 +01:00
Shubham Parihar
f7e420bf29 docs: add new guild features (#5755) 2021-06-05 11:04:56 +01:00
monbrey
c6696d8399 types: extend MessageComponentInteractionCollector correctly (#5752) 2021-06-05 11:04:31 +01:00
TheMaestroo
cf224560bc fix(RoleManager): bug in #create (#5730)
Co-authored-by: ckohen <chaikohen@gmail.com>
2021-06-05 07:14:44 +01:00
monbrey
cbd7f2b9aa feat(MessageComponents): clickybois (MessageButton, MessageActionRow, associated Collectors) (#5674)
Co-authored-by: Vicente <33096355+Vicente015@users.noreply.github.com>
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: BannerBomb <BannerBomb55@gmail.com>
Co-authored-by: Arechi <22101241+Arechii@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-04 16:49:46 +01:00
Shubham Parihar
df9b67894a docs(Message): fix content param in #edit not showing as nullable (#5748) 2021-06-03 23:08:40 +01:00
iCrawl
43fc40e9b4 types: fix awaitReactions typings for returned collection 2021-06-03 20:29:02 +02:00
Shubham Parihar
a2f0c11474 fix(Message): update typings and docs related to #edit (#5745)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-06-03 19:18:13 +01:00
Rodry
ff4d6dded5 types: change remaining string IDs to Snowflakes (#5737) 2021-06-03 19:17:31 +01:00
Casper
3e9ce35023 fix(Typings): add missing typings for HttpError -> requestData (#5742)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-03 19:17:05 +01:00
SpaceEEC
99e2ca408b debug(WebSocketShard): emit intents used in identify (#5744) 2021-06-03 16:18:21 +01:00
Vlad Frangu
db0d7d4ea8 feat(Esm): use gen-esm-wrapper instead of manually making the file (#5700) 2021-06-03 16:01:49 +01:00
Jan
b317d86a93 docs: all the missing object -> Object changes (#5738) 2021-06-03 15:57:46 +01:00
Jan
bfe01b52ab fix(MessageEmbed): import custom RangeError class (#5740) 2021-06-03 15:54:19 +01:00
Justin
02b3cca522 chore: update the color of the discord.js server badge (#5739)
This uses the hex code 5865F2, which is the new blurple of Discord.
2021-06-03 15:53:51 +01:00
Vlad Frangu
ef92339d07 feat(Rest): show the data that is sent to Discord when an errors occurs (#5701) 2021-06-03 09:35:09 +01:00
Shubham Parihar
af2fad9473 fix(CommandInteraction): cmds with no options throw error (#5734) 2021-06-03 09:34:40 +01:00
Shubham Parihar
fdad140997 feat(CommandInteraction): make options a collection (#5705) 2021-06-02 17:44:50 +01:00
Lupa
5141ea4f06 fix(CommandInteraction): channel type should be text based channels (#5690)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-02 11:05:35 +01:00
Andreas Clausen
d21e6af1d2 fix(GuildMemberManager): allow moving members to any non-text channel (#5681) 2021-06-02 10:57:04 +01:00
Shubham Parihar
678b7da5b3 docs: remove traces of StringResolvable (#5727) 2021-06-02 10:55:56 +01:00
Shubham Parihar
086c3f0799 fix: interfaces not importing due to re-export of Snowflake (#5723)
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-06-02 01:01:59 +01:00
Jan
53d952a4ce refactor: remove _roles from pseudo-managers (#5721) 2021-06-01 22:35:11 +01:00
Souji
7b85a7259f feat(*): enforce strings (#4880)
BREAKING CHANGE: Removes all Resolvables for only string inputs

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-06-01 16:31:49 +01:00
monbrey
66a6a1fced types(Snowflake): export the type (#5722) 2021-06-01 07:02:59 +01:00
iCrawl
7f0d93a2da chore: pull config files out of package.json 2021-06-01 00:06:52 +02:00
SpaceEEC
b212b64214 feat(Message): allow editing files into messages (#5718) 2021-05-31 20:56:26 +01:00
Shubham Parihar
256d1b0dfc docs(Webhook): update typings and docs for #editMessage (#5713) 2021-05-31 20:56:08 +01:00
Noel
76db642543 types: use Snowflake type (#5717)
* types: use Snowflake type

* Update typings/index.d.ts

Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>

Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-05-31 20:55:18 +01:00
Souji
d52bcd46ec feat: easier guards for channelUpdate (#5716)
* feat: easier guards for channelUpdate

* typings: more explicit typings for client events involving channels

* docs: event doc consistency regarding channel types
2021-05-31 16:38:37 +01:00
iCrawl
652c683da7 ci: fix publish action 2021-05-31 03:23:48 +02:00
dependabot[bot]
0b169792af chore(deps): bump ws from 7.4.5 to 7.4.6 (#5707)
Bumps [ws](https://github.com/websockets/ws) from 7.4.5 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.5...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-30 23:04:12 +01:00
Jeroen Claassens
91efe5a611 ci(publish-dev): improve resolving of next version (#5710) 2021-05-30 23:03:35 +01:00
iCrawl
01bb2ac97b ci: publish action for automatic master releases 2021-05-30 21:33:02 +02:00
Adrian Castro
6567ba821a fix(PermissionOverwrites): fix typo in typedef jsdoc (#5704) 2021-05-30 18:59:51 +01:00
Jan
48d6850d9a feat: add support for fetching multiple guilds (#5472)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-05-29 22:37:45 +01:00
Vanished
e300518597 Added Certified Moderator badge flag. (#5642)
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
2021-05-29 15:29:29 +01:00
ckohen
0b179c87f1 cleanup(Client): guard emitting GMU and PU on user updates (#5655) 2021-05-29 15:28:41 +01:00
Ed L
7d7d2a53b1 docs(Message): add example for message.reply (#5332)
Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>
2021-05-29 15:27:33 +01:00
Rodry
47bbdf415c docs(TextChannel): warning about setRateLimitPerUser NewsChannel (#5403) 2021-05-29 15:26:30 +01:00
Antonio Román
a73a5cf914 fix(Types): make event listeners accept async callbacks (#5602) 2021-05-29 12:28:21 +01:00
Jan
add924cdb2 docs: fix InteractionDeferOptions typedef (#5694) 2021-05-29 12:24:28 +01:00
Shubham Parihar
c89bdd7566 fix(GuildEmojiRoleManager): bug in #remove (#5666) 2021-05-28 11:09:51 +01:00
SpaceEEC
b90b0c3cfa fix(ApplicationCommandOptionData): options property should be itself (#5679)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-05-27 12:14:13 +01:00
Rodry
7d9818e21a docs(ColorResolvable): Add Fuchsia to ColorResolvable typedef (#5676)
Also moved DARKER_GREY to its place in the Colors export on Constants.js
2021-05-27 12:13:58 +01:00
Shubham Parihar
3fe7add2c5 feat(Guild): add the new nsfw_level property (#5660)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-05-27 12:12:52 +01:00
Shubham Parihar
b40027beb9 types(PermissionOverwriteOptions): remove unused interface (#5651) 2021-05-27 12:12:44 +01:00
SpaceEEC
9f491ffeb9 fix(APIMessage): document Interaction as valid MessageTarget (#5678) 2021-05-27 11:54:42 +01:00
Shubham Parihar
840ad0a35a fix(Message): bug in #suppressEmbeds due to #5612 (#5644) 2021-05-26 12:09:35 +01:00
Shubham Parihar
3589e0f442 docs: add new typedef to properly doc InteractionReplyOptions (#5632) 2021-05-26 12:09:25 +01:00
Jan
ed593c91fb feat: InteractionDeferOptions (#5641) 2021-05-26 12:09:14 +01:00
iCrawl
5f6ec2211d fix: lint-staged for typescript files 2021-05-26 11:09:56 +02:00
Noel
3ac6d550ca chore: fix husky install (#5671) 2021-05-25 21:36:26 +01:00
Matt (IPv4) Cowley
0ca200f322 chore: set minimum npm version (#5663) 2021-05-24 19:58:42 +01:00
cherryblossom000
b376f31af9 fix(DataResolver): fix circular dependency error with GuildTemplate (#5622) 2021-05-22 21:40:44 +02:00
Antonio Román
14c6802438 refactor(Deps): use async-queue package (#5662) 2021-05-22 21:10:20 +02:00
Noel
f8703e3e59 chore: general cleanup (#5661) 2021-05-22 11:40:30 +02:00
Jan
03256bd9f8 fix(ApplicationCommandManager): limit permission methods to guilds (#5613)
* fix(ApplicationCommandManager): limit permission methods to guilds

* docs: add warn tags

* feat: improve error message

* style: eslint

* chore: make error name more verbose
2021-05-22 10:02:24 +02:00
Shubham Parihar
56d44fbf1c fix(CommandInteraction): update typings and docs for #editReply (#5630) 2021-05-22 09:58:06 +02:00
Casper
38bf24a6e5 chore(Colors): use new Discord colors (#5624)
* chore(Colors): use new Discord colors

* chore(Colors): add fuchsia color

* chore(Colors): add fuchsia color to ColorResolvable
2021-05-22 09:52:48 +02:00
Shubham Parihar
c8d20a456b docs(Guild): add proper punctuation to #fetchOwner jsdoc (#5645) 2021-05-18 23:21:57 +02:00
Vlad Frangu
ab82cafcde docs: correct casing of object -> Object in AuditLogChange (#5636) 2021-05-15 23:25:06 +02:00
Juruel Keanu Lorenzo
a6079bc9ce fix(ApplicationCommand): return string equivalent of ApplicationCommandOptionType (#5617) 2021-05-15 00:40:41 +02:00
monbrey
68b40dd91d feat(CommandInteraction): ephemeral followup messages (#5618)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-05-15 00:40:23 +02:00
monbrey
c7334363b3 fix: resolve emoji in Message#react (#5614) 2021-05-13 17:48:07 +02:00
monbrey
73f4114f59 fix: typo in GuildMemberManager (#5616) 2021-05-12 17:51:50 +02:00
Souji
f831872125 feat(GuildChannel): createInvite target options (#5514)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Advaith <advaithj1@gmail.com>
2021-05-11 22:25:09 +02:00
anandre
ff2f7372f2 feat(MessageEmbed): remove normalizeField validation (#5459) 2021-05-11 22:24:35 +02:00
Vicente
d219ecd05c docs(GuildChannelManager): add stage option (#5608) 2021-05-11 22:23:58 +02:00
monbrey
2e2464bf07 feat(GuildMemberManager): extend API coverage (#4872)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-05-11 22:23:42 +02:00
Synbulat Biishev
668cd471a1 fix(Client) added a forgotten keyword "this" (#5598) 2021-05-11 22:23:27 +02:00
Shubham Parihar
58763b0e91 feat(GuildChannel): make createOverwrite and updateOverwrite not dependent on cache (#5489)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-05-11 22:23:09 +02:00
SpaceEEC
74e97ef91b fix(Message): editing with MessageEmbed or APIMessage (#5612) 2021-05-11 22:22:48 +02:00
Nojay-Games
2eac84296b fix(VoiceReceiver): fix memory leak (#5609)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-05-11 13:33:45 +02:00
monbrey
c56c4a8dc8 feat(MessageManager): extend API coverage (#4869)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Advaith <advaithj1@gmail.com>
2021-05-11 00:32:15 +02:00
Shubham Parihar
7ce741dacd feat(Message): add ReplyMessageOptions for #reply (#5296) 2021-05-10 23:58:19 +02:00
uhKevinMC
31b4390042 feat(ShardingManager): add options typings (#5583)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-05-10 23:54:32 +02:00
Shubham Parihar
2345c6db0c typings(WebhookMessageOptions): omit reply instead of replyTo (#5610) 2021-05-10 22:48:32 +02:00
Ishmaam Khan
d455cb65a6 feat(GuildChannel#clone): support for position property (#5236) 2021-05-10 12:41:14 +02:00
MBR-0001
6d09160f5b feat: GuildBanManager (#5276)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
2021-05-10 12:35:25 +02:00
Rodry
4a06dd1295 docs(MessageEmbed): MessageEmbedOptions typedef (#5466)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-05-10 12:31:35 +02:00
ckohen
eaf332f83f refactor(*): return the invalid element when erroring from Array (#5314) 2021-05-10 12:28:36 +02:00
ckohen
1ecda83da7 refactor(MessageOptions): move replyTo to reply#messageReference and add failIfNotExists (#5298)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
2021-05-10 12:27:36 +02:00
Justin
533c2471c2 docs: update invite link, change version in the intro (#5592) 2021-05-10 10:57:20 +02:00
Advaith
135abccd9c feat(APIRequest): support setting global headers in HTTPOptions (#5586)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-05-10 10:56:56 +02:00
monbrey
1398431bca feat(Message): replace referencedMessage with fetchReference (#5577) 2021-05-10 10:56:46 +02:00
Jan
ca9e5a0ee1 feat(Message): allow removing attachments (#5557) 2021-05-10 10:56:33 +02:00
Adrian Castro
3392eb7de2 fix(ApplicationCommandManager): fix typo in JSDoc (#5603) 2021-05-10 10:55:58 +02:00
dependabot[bot]
0e40f9b868 chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#5595)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-08 01:25:43 +02:00
Jan
9f74f95f69 feat: add support for application command events (#5596) 2021-05-08 01:25:27 +02:00
Amish Shah
452ac55a28 chore: update package author email address 2021-05-07 20:15:02 +01:00
dependabot[bot]
b456ff1090 chore(deps): bump lodash from 4.17.20 to 4.17.21 (#5594)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 17:26:33 +02:00
dependabot[bot]
043a25992a chore(deps): bump handlebars from 4.7.6 to 4.7.7 (#5593)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-07 17:24:24 +02:00
Jan
f7643f7bbe feat: interactions (#5448)
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: Shiaupiau <stu43005@gmail.com>
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com>
Co-authored-by: Carter <carter@elhnet.net>
2021-05-07 17:22:33 +02:00
Antonio Román
af00ec8970 refactor(Sticker): rename Snowflake variable (#5575) 2021-04-30 22:32:52 +02:00
Jan
f830eb7101 fix(Sticker): file renamed to SnowflakeUtil (#5573) 2021-04-30 22:26:55 +02:00
Junseo Park
026afc2c1a feat(Sticker): added Sticker (#4909)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Mestery <48163546+Mesteery@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-04-30 21:53:25 +02:00
izexi
63398d6ae4 feat(Webhook): add 'fetchMessage' method (#5530) 2021-04-30 21:49:32 +02:00
Souji
d9fa180cf9 feat(GuildManager): allow system channel flags in create (#5504) 2021-04-30 21:48:57 +02:00
Souji
4866e2672f feat(Guild): setChannelPositions parent, lockPermissions keys (#5507)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-04-30 21:48:51 +02:00
ckohen
a5d41c9f6c refactor(RequestHandler): use x-ratelimit-reset-after when present (#5511) 2021-04-30 21:48:37 +02:00
Robert Coe
cdcc50f365 refactor: remove error-silencing try/catch on event handler imports (#5542) 2021-04-30 21:48:19 +02:00
Souji
5397021efb fix(Emoji): name can be null (#5513) 2021-04-30 21:47:15 +02:00
monbrey
c9b53539d5 refactor(Sharding): use options objects (#5510)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-04-30 21:46:20 +02:00
Souji
116ecf246e feat(Webhook): sourceGuild, sourceChannel, improve owner (#5508) 2021-04-30 21:44:23 +02:00
Shubham Parihar
9572521e3c fix(GuildMemberRoleManager): unable to remove roles when passed an array (#5556) 2021-04-30 21:43:14 +02:00
Souji
8a059cccb8 feat(Guild): allow description and features in edit (#5505) 2021-04-27 09:36:48 +02:00
Souji
2c54f72670 chore(UserFlags): remove system flag (#5517) 2021-04-25 18:59:13 +02:00
Skick
705d7b36af docs(VoiceState): #setRequestToSpeak and #setSuppressed returns a Promise instead of void (#5558) 2021-04-23 18:24:22 +02:00
Jan
1b827fe136 refactor: add discord-api-types as a dependency (#5539) 2021-04-23 02:18:07 +02:00
GoldElysium
0d68ca8eb9 fix: typings for 'Message' (#5518) 2021-04-21 02:44:19 +02:00
Yoshida Tomio
cb50241e6f fix(HTTPOptions): change default value in jsdoc to 8 (#5547) 2021-04-20 19:37:45 +02:00
Advaith
f1c0c043b5 feat(Util): make cleanContent take a channel instead of a message (#5535) 2021-04-18 18:53:09 +02:00
Souji
596832371c feat(Guild): nsfw guilds (#5525)
Co-authored-by: Advaith <advaithj1@gmail.com>
2021-04-18 18:52:53 +02:00
Advaith
1be67b8851 feat(Guild): replace owner with fetchOwner (#5480) 2021-04-16 06:39:12 +02:00
PhaxeNor
3c175cb511 feat(GuildFeatures): added the new screening features (#5328)
Co-authored-by: Noel <icrawltogo@gmail.com>
2021-04-15 02:07:15 +02:00
anandre
936516cb9c docs(GuildChannelManager): fix type options in description (#5440) 2021-04-15 00:39:12 +02:00
monbrey
7b161f93a0 feat(MessageAttachment): support for #contentType (#5481)
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
2021-04-15 00:38:45 +02:00
Jan
164ddf668f refactor: rename Snowflake to SnowflakeUtil (#5502) 2021-04-15 00:37:54 +02:00
Souji
e9bf206d88 fix(GuildAuditLogsEntry): executor can be missing (#5500) 2021-04-15 00:37:45 +02:00
Souji
fe93a7e084 feat(SysChanFlags): new flag and rename in sync with client (#5506) 2021-04-15 00:37:32 +02:00
Jan
207735cedc feat: move internal regular expressions to static properties (#5384) 2021-04-15 00:36:35 +02:00
Bryan Chen
900e57657e fix(typings): update GuildMemberRoleManager typings to match implementation (#5497) 2021-04-15 00:35:04 +02:00
GrapeColor
565d7b3747 fix(MessageMentions#channels): Fix type of channels of mentions (#5370) 2021-04-15 00:34:13 +02:00
Kevin Novak
32b0d71af7 feat(typings): add ShardingManager.shardList to type definitions (#5446) 2021-04-15 00:33:59 +02:00
Ven
7c49612d4b feat(typings): explicitly type PremiumTier and Collectors (#5458) 2021-04-15 00:33:35 +02:00
Shubham Parihar
fa5a37e51a fix(Resolvables): valid resolvables throw error when uncached (#5495)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-04-15 00:32:08 +02:00
Yoshida Tomio
b380f16367 chore(ci): Update actions/setup-node action to v2 (#5527) 2021-04-15 00:31:32 +02:00
Bread
b710a43232 fix(GuildChannel): check for community required channels in GuildChannel#deletable (#5170)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2021-04-15 00:31:08 +02:00
Sugden
aff3625d4f fix(GuildMember): correctly check for premium_since (#5312) 2021-04-15 00:30:45 +02:00
Shubham Parihar
eb43ce4d4f feat: make changes to PresenceData typings and docs (#5317)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-04-14 14:53:54 +02:00
Advaith
c9107e35fa feat(MessageTypes): add 16 and 17 (#4685) 2021-04-14 14:53:30 +02:00
izexi
0ba2bcb545 feat(GuildMemberManager): add 'search' method (#4154)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-04-14 14:53:01 +02:00
Amish Shah
eec7cf7634 feat: stage channels (#5456)
* feat: add stage channel type

* feat: initialise stage channel structure

* feat: add STAGE_MODERATOR permissions bitfield

* fix: typo in permissions

* fix(Channel): type selection logic

* feat: add rtcRegion to StageChannel and VoiceChannel

* feat: rtc region editing for stage and voice channels

* feat: stage channel userLimit

* feat: add stage channels to exports

* feat: add computed properties to stage channel

* feat(VoiceState): include stage channel in docs

* feat: allow ability to join stage channels

* feat(StageChannel): join and leave methods

* docs: add StageChannel link in GuildChannel docs

* feat(VoiceState): suppress and requestToSpeakTimestamp

* feat(StageChannel): setRequestToSpeak

* refactor(StageChannel): update setRequestToSpeak

* feat(VoiceState): add moveToSpeakers and moveToAudience

* feat(VoiceState): add methods to move in/out of speakers

* feat(VoiceState): add stage channel sanity checks

* feat(Permissions): add REQUEST_TO_SPEAK

* feat(VoiceState): simpler methods

* docs(VoiceState): add documentation for new methods

* refactor: remove unused error message

* chore: remove debug statements

* chore: revert changes to package-lock.json

* docs(VoiceState): clarify suppress

* docs(VoiceState): add missing @type param

* feat(StageChannel): remove nsfw property

* fix(VoiceState): check permissions in channel

Co-authored-by: Advaith <advaithj1@gmail.com>

* fix(VoiceState): instantiate error with new

Co-authored-by: BannerBomb <BannerBomb55@gmail.com>

* refactor(VoiceState): more readable API route builder

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* style(VoiceState): fix lint errors

* docs(VoiceState): add example usage for new methods

* docs: setRTCRegion examples

* chore: update typings

* fix(VoiceState): calculate permissions for self

* refactor(VoiceState): tidy up implementation

* Update src/structures/VoiceState.js

Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>

* refactor: vaporox's suggestions

* style(VoiceState): fix linter errors

* chore: update typings

* chore: remove unused error message

* refactor(VoiceState): use optional chaining

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* chore: move getters below constructor in typings

* refactor(StageChannel): optional chaining

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* style(VoiceState): fix lint errors

* docs: fix incorrect types

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/VoiceChannel.js

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/VoiceChannel.js

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* refactor(VoiceState): use optional chaining

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* refactor(StageChannel): remove permission override check in joinable

* refactor: make ChannelTypes a proper enum

* Use createEnum

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>

* chore: remove unused code from Constants

* refactor(StageChannel): remove unnecessary getters

* chore: update typings

* refactor: introduce BaseGuildVoiceChannel class

* refactor(VoiceChannel): reduce code duplication

* feat: export BaseGuildVoiceChannel

* chore: update typings

* docs: fix typos

* refactor: move setRTCRegion to BaseGuildVoiceChannel

* feat(VoiceState): remove permission checks

* chore: update typings

* Apply suggestions from code review

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>

* chore: update esm exports and typings

* Update src/structures/VoiceState.js

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

Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: BannerBomb <BannerBomb55@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-04-14 13:35:55 +01:00
Advaith
63ff6a07eb feat(Activity): add missing fields (#4984)
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2021-04-06 23:03:45 +02:00
Souji
599f0f5cef docs(ClientUser): #setPresence does not return a promise (#5485) 2021-04-05 23:26:28 +02:00
Carson M
2b52cdc915 fix(Voice): only skip undocumented voice packet byte if present (#5309)
* fix(Voice*): Only skip undocumented byte if present

* fix linting errors
2021-04-05 08:56:48 +01:00
izexi
67025e63e4 fix: typings for 'WebhookMessageOptions' (#5476) 2021-04-04 23:17:19 +02:00
Souji
e848d25c86 docs(GuildChannel): #members add cached spec, include voice (#5385) 2021-04-03 20:01:54 +02:00
Jan
0a2e0c0e3e refactor(Guild): remove fetchVanityCode() (#5471) 2021-04-03 20:01:14 +02:00
Souji
8023250ee7 fix(IntegrationApplication): add missing export to index.js (#5475) 2021-04-03 20:00:41 +02:00
izexi
7cabc1c490 feat(Webhook): add '(edit|delete)Message' methods (#5223) 2021-04-03 15:06:18 +02:00
Jan
404ce57bcc fix(ApplicationFlags): export class (#5465) 2021-04-03 15:01:52 +02:00
Shubham Parihar
b82ea98c71 chore: allow three more types of commit msgs (#5470) 2021-04-03 15:01:35 +02:00
Shubham Parihar
a4d09ab0a8 types: remove typings for Client#disconnect event (#5469) 2021-04-03 15:01:20 +02:00
Amish Shah
3af8179878 fix(Voice): disconnect if voice channel not cached (#5467) 2021-04-02 12:53:49 +02:00
Souji
6c6b1053b7 fix(InviteDelete): guild can be missing (#5457) 2021-03-31 22:31:37 +02:00
Alec Woods
9d2d60691e feat(Rest): better handling of global rate limit and invalid request tracking (#4711)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
Co-authored-by: Papaia <43409674+Papaia@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-03-31 21:56:58 +02:00
Jan
06e9d86cb3 feat(Application): application flags (#5147)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-03-31 21:55:12 +02:00
Shubham Parihar
dedf43288e docs(BanOptions): make days description more clear (#5327) 2021-03-29 05:52:41 +02:00
Carter
685b2604e4 docs: update docs and examples for #4879 (#5323)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-03-29 05:51:42 +02:00
Souji
624a4464ca feat(WebSocketManager): let identify throw on depleted limits (#5283)
* feat(WebSocketManager): let identify throw on depleted limits

* chore: remove WSM#sessionStartLimit
2021-03-28 15:33:31 +02:00
Jan
8d14ee3540 refactor(Collector): make endReason a getter (#5271) 2021-03-28 15:29:39 +02:00
SynysterZV
09846c725b chore: update d.js guide FAQ link (#5176) 2021-03-28 15:29:03 +02:00
Souji
43bd568f1c fix(ReactionUserManager): remove before query option (#5281) 2021-03-28 15:28:33 +02:00
Sugden
ca5f371f1a typings(PermissionOverwrites): use correct parameter type for resolveOverwriteOptions (#5302) 2021-03-28 15:28:08 +02:00
Souji
62ba2499e0 docs(GuildMember): document owner override in permissions getter (#5320) 2021-03-28 15:27:32 +02:00
Carter
077892645b fix(GuildManager): add missing toString() on Permission#resolve fns (#5324) 2021-03-28 15:27:16 +02:00
Carter
aac6275300 typings(MessageReaction): allow message to be partial (#5303) 2021-03-28 15:26:44 +02:00
Souji
e7c4f3672e fix(GuildChannel): regression on default channel type (#5251) 2021-03-28 15:24:41 +02:00
Advaith
1c8b1096c6 docs(ChannelManager): fetch can return Promise<null> (#5422) 2021-03-28 15:24:19 +02:00
BannerBomb
8411b9e142 fix(Guild/GuildChannel): methods reason arg usage (#5419) 2021-03-28 15:23:32 +02:00
nopeless
4099c28776 test: client should destroy (#5353)
Co-authored-by: Adrian Paschkowski <leiter04@gmail.com>
2021-03-28 15:22:04 +02:00
Tyler Resch
941e36f48a docs(Guild): clarified description of guild.features (#5352)
- Removed the phrase "partnered guilds" from the description of `guild.features`

**Reasoning:**
To prevent the assumption that **any** `guild.features` will be indicative of `guild.partnered`.
2021-03-28 15:21:32 +02:00
Jan
f46940228e feat: jsdelivr default file support (#5424) 2021-03-22 21:31:55 +01:00
Jan
d744e51c1b fix(Role): pass Permissions class, not the bitfield (#5321) 2021-02-22 01:03:21 +01:00
Sugden
ee5bc1a5c4 refactor: switch api and gateway to V8 (#4879)
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2021-02-11 18:10:35 +01:00
ckohen
ae3c3d80ee feat(Client): add InviteGenerationOptions#additionalScopes (#5215)
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-02-10 15:52:44 +01:00
BannerBomb
56d8b445ed fix(WebSocketShard): key name in WebSocketShard#_send. (#5304)
I just changed an incorrect key name that was introduced in Pull Request #3722. When destroying the websocket from the WebSocketShard#_send method it's using `close` as the key name instead of `closeCode`
2021-02-10 15:48:16 +01:00
Souji
cee6cf70ce chore(*): streamline issue and PR templates and redirects (#5269)
* chore(*): streamline issue and PR templates and redirects

* chore: reword redirect to not sound apologetic

* chore: reintroduce one-liner to use discord for questions

* chore: ae consistency
2021-01-27 20:31:47 +01:00
Alon Livne
09d1f2f18f feat(ReactionCollector): event create (#4108)
* fix(Typing): setSpeaking public

* feat(ReactionCollector): create event, close #2844

* Revert "fix(Typing): setSpeaking public"

This reverts commit ccc0e0cc76.
2021-01-27 12:13:15 +01:00
Shubham Parihar
640a6633b1 docs(BaseManager): fix a typo in #resolveID description (#5180)
* fix(BaseManager): #resolveID returns null for non-numeric string arg

* docs(BaseManager): fix a typo in #resolveID description
2021-01-27 11:30:08 +01:00
Antonio Román
a6bc39d3c6 fix(ApiMessage): remove resolve() from typings (#5241) 2021-01-27 11:28:26 +01:00
Matt (IPv4) Cowley
aaed72b723 refactor(Client): remove fetchAllMembers option (#5257)
* feat(Client): remove fetchAllMembers option & logic

* Cleanup

* Missed type change
2021-01-27 11:27:50 +01:00
Antonio Román
41bd6c2717 fix(GuildChannel): overload permissionsFor and BaseManager#resolve[id] (#5260)
* fix(GuildChannel): overload permissionsFor and BaseManager#resolve[id]

* fix(GuildChannel): GuildMessage and Role trigger non-null return
2021-01-27 11:27:01 +01:00
Papaia
9ffcd83027 docs(BitFields): remove string from BitFieldResolvable (#5122)
* refactor(BitFields): remove string from BitFieldResolvable

* docs(Client#generateInvite): fix indentation in example

* chore: resolve conflict

* refactor: revert breaking changes

Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2021-01-24 11:52:35 +01:00
Ishmaam Khan
5401b92aac refactor(GuildMember): remove GuildMember#hasPermission (#5152)
* refactor(GuildMember): remove GuildMember#hasPermission

* refactor(GuildEmoji): remove use for `GuildMember#hasPermission`

* typings: remove `GuildMember#hasPermission`
2021-01-24 11:50:58 +01:00
Kevin Novak
80e1afb654 types(RateLimitData): remove timeDifference property (#5208) 2021-01-24 11:49:26 +01:00
Alex
001676c7a9 feat(ShardingManager): Allow b-Eval/fetchClientValues on a specific shard when not all are ready (#5222)
Co-authored-by: BennyDiscord <46286597+BennyDiscord@users.noreply.github.com>
2021-01-24 11:49:15 +01:00
Jan
a33eed71af refactor(Util): remove convertToBuffer (#5237) 2021-01-24 11:48:03 +01:00
Carter
8bf76ffa52 chore: remove webpack from deploy workflow (#5253) 2021-01-24 11:47:20 +01:00
ckohen
f95f5dcd79 fix(GuildEmoji): check for cahnges to available in equals (#5201) 2021-01-22 19:18:06 +01:00
Shubham Parihar
0d5de4333d fix(VoiceConnection): make #dispatcher nullable (#5217) 2021-01-22 19:17:32 +01:00
monbrey
5ac3b57f9b feat(GuildChannel): support conversion between text and news (#5022)
* feat(GuildChannel): support conversion between text and news

* fix(Typings): add type to ChannelData

* fix(GuildChannel): use ChannelUpdate action handler to change class type

* Update src/structures/TextChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix(Typings): re-use ChannelType from GuildCreateChannelOptions

* fix(Typings): only allow text-news conversion

* fix(Typings): exclude -> pick (vlads suggestion)

* fix(Typings): pick -> exclude in two other spots

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-01-22 18:03:02 +01:00
Zaid
98b1c58218 fix(Message): update getters to take null permissions into account (#5066)
* fix(Message): update message#delete

* refactor(Message): message#deletable avoid duplicate call

* Update Message.js

* fix(message): resolve syntax errors

* chore(message): resolve linting issues (death to the gh web panel)

* Update Message.js

* death to the github web panel

* Update src/structures/Message.js

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2021-01-22 18:02:21 +01:00
izexi
eb28ee7905 fix(typings): return types for 'Webhook(Client)#send()' (#4876)
* feat(Typings): add 'APIRawMessage' interface

* fix(Typings): return type for WebhookFields#send()

* fix(Typings): types for APIRawMessage props

* refactor(Typings): exclude oauth props from API

* feat(Typings): add WebhookRawMessageResponse type

* refactor(Typings): use WebhookRawMessageResponse
2021-01-22 17:46:55 +01:00
Carter
c8ad52b89d chore: remove codeql job (#5231) 2021-01-22 17:45:40 +01:00
Souji
273e9557be feat(BitField): move problematic bit into the error message (#5228)
* feat(BitField): move problematic bit into the error message

* fix: remove intermediate constant
2021-01-22 17:44:50 +01:00
ElCholoGamer
764966e398 feat(ClientEvents): add tuple labels to event arguments (#5225) 2021-01-22 17:44:11 +01:00
Adrian Paschkowski
c4c817116f feat(GuildMember): #pending (#5121)
* Add GuildMember#isPending

* Rename is_pending to pending

* Improve jsdoc wording

* pending isn't nullable

* ??
2021-01-02 23:55:37 +01:00
Bread
e37160f4e3 fix(MessageEmbed): include author.name in length getter (#5167)
* fix(MessageEmbed): include `author.name` in length getter

* Update src/structures/MessageEmbed.js

Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>

* style: oxford comma

Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>

* refactor: es2020 syntax

Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>
2021-01-01 00:11:52 +01:00
Sugden
57b3ba425e chore: remove webpack from .*ignore files (#5171) 2021-01-01 00:10:56 +01:00
Mr¤KayJayDee
4e132f18c4 chore: bump LICENSE year (#5173) 2021-01-01 00:10:24 +01:00
Antonio Román
b0077dcd0c chore(Deps): remove setimmediate (#5159)
setimmediate is a browser polyfill, and since we do not support webpack anymore, there is no reason to keep it here.
2020-12-30 11:22:11 +01:00
Matt (IPv4) Cowley
8c2e6b70b8 refactor(Message): remove stored edit history (#5155) 2020-12-30 11:21:34 +01:00
ManEatingTapir
6a77453532 chore(RoleManager): change parameter of create to be one unnamed object (#5026)
* chore(RoleManager): change parameter of create to be one unnamed object

* chore(RoleManager): update src/managers/RoleManager.js

* chore(RoleManager): update typings/index.d.ts

* chore(RoleManager): update src/managers/RoleManager.js

Co-authored-by: Noel <buechler.noel@outlook.com>
2020-12-26 10:59:16 +01:00
ckohen
2aea7dd921 docs(MessageEditOptions): add the flags parameter (#5126) 2020-12-26 10:58:02 +01:00
Ishmaam Khan
2a0dcc5cae refactor: RoleManager (#5131)
* refactor(RoleManager): make use of `BaseManager#client`

* refactor(RoleManager): cool syntax

* refactor +1

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* refactor +2

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-12-26 10:57:34 +01:00
Jan
2c2249ee73 fix(Collection): toJSON() errors if the collection includes empty values (#5129) 2020-12-26 10:56:37 +01:00
dependabot[bot]
b19b8b593a chore(deps): bump node-notifier from 8.0.0 to 8.0.1 (#5145)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-26 10:54:50 +01:00
cherryblossom000
40d77bacc3 types: make Client#voice non-nullable (#5148)
Because of the removal of browser support (#5113) Client#voice is always non-nullable.
2020-12-26 10:54:15 +01:00
Zaid
b8be7237b8 Create CODE_OF_CONDUCT.md (#5120)
* Create CODE_OF_CONDUCT.md

* chore: move coc into .github/
2020-12-18 06:24:25 +01:00
Ishmaam Khan
ffe31405ff feat(GuildEmojiManager): implement GuildEmojiManager#fetch (#4933)
* feat: GuildEmojiManager#fetch

* typings: GuildEmojiManager#fetch
2020-12-14 21:44:15 +01:00
anandre
be0f383568 docs(RoleManager): fetch description (#4920)
* Update fetch description

The `fetch` method does not support fetching multiple IDs, so the description is currently inaccurate.

* Update src/managers/RoleManager.js

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2020-12-14 14:12:36 +01:00
monbrey
b2a6720477 revert: 5047 (#5050) 2020-12-14 13:58:21 +01:00
Noel
0a591a9697 feat(Browser): remove browser � (#5113) 2020-12-14 13:56:16 +01:00
X-Classified
5c4547e84d docs(TextBasedChannel): indicate that replyTo cannot be system (#5115) 2020-12-14 13:54:51 +01:00
Souji
d6234b764e feat(Role): role tags (#4628)
* feat(Role): role tags

* fix(RoleManager): fix js docs and mark nullable

* fix(Role): typings tags are be null, not undefined

* fix(Role): getters should actually return a bool

* fix(RoleManager): typo

* fix(Role): should always return a boolean

* fix(Gmrm): getter should return null

* fix(RoleManager): getters should return null

* fix: typing getters should return null

* fix(Role): docs grammar and consistency

* chore: prefer in operator over Reflect#has

* feat(GmRm): botRole getter

* fix(GmRm): use the actual properties

* feat(RoleManager): rem myRole in pref o botRoleFor

* fix(Role): remove obsolete is- getters

* fix:  checking tags after getter removal

* chore: identifier naming consistency

* chore: prefer explicit true type over boolean

* fix: typo

* feat(Integration): Add Integration#roles getter (#1)

* fix(RoleManager): remove bot check r:partials

* feat(RoleManager): robustness against uncached u

* docs: possibly undefined

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2020-12-14 13:54:02 +01:00
Souji
8883a0144b fix: implement valueOf on pseudomanagers (#4595) 2020-12-14 13:52:21 +01:00
Jan
75e6dfbfd3 refactor(Message): remove options for Message#delete (#4999) 2020-12-14 13:52:04 +01:00
Advaith
41078997ae feat(APIMessage): remove disableMentions (#4836)
* chore: remove disableMentions

* style: fix eslint
2020-12-14 13:51:31 +01:00
Mirdukkk
9c7fe34c50 fix: add presence to ClientPresence from ClientOptions (#5041) 2020-12-13 03:14:23 +01:00
VoltrexMaster
9042d19c4e fix: filtering of string forms of null and undefined (#5075)
Removed null and undefined being filtered out in string forms which caused issues in `<client>.api`, issue: https://github.com/discordjs/discord.js/issues/5072
2020-12-13 03:13:52 +01:00
Awesome Stickz
12c909eecc fix(ChannelManager): Avoid crash in remove method with uncached channel (#4937)
* fix(ChannelManager): Avoid crash in remove method with uncached channel

* Use optional chaining

Co-authored-by: Ishmaam Khan <ishmaamk@gmail.com>

Co-authored-by: Ishmaam Khan <ishmaamk@gmail.com>
2020-12-12 22:40:50 +01:00
X-Classified
bb78120283 fix(Message): #system non-zero message types are not guaranteed to be system (#5108)
* fix(Message): #system not all nonzero message types are system

* feat(Message): introduce system message types

* refactor(Constants): change SystemMessageTypes to be exclusionary

* fix(Constants): only need to check if type exists

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>

* fix(Constants): lint

* fix(Typings): add SystemMessageTypees to Constants

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2020-12-12 22:40:39 +01:00
Jan
5b51392724 refactor(Client): improve generateInvite() (#5065)
* cleanup(Client): improve generateInvite()

* fix: you actually do need to fetch the application
2020-12-12 22:38:57 +01:00
dependabot[bot]
b6b3c6f29b chore(deps): bump ini from 1.3.5 to 1.3.8 (#5110)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-12 14:56:44 +01:00
Zaid
d70127cee6 feat(GuildMember): make GuildMember#setNickname first param nullable (#5070)
* Update index.d.ts

* Update GuildMember.js

* Update src/structures/GuildMember.js

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>

* Update GuildMember.js

* Update index.d.ts

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2020-12-12 14:50:33 +01:00
anandre
77d42373a1 docs: permission overwrite methods descriptions (#5079)
* Change permission overwrite methods descriptions

The methods `GuildChannel#updateOverwrite` and `#createOverwrite` had some awkward wording in the description: `. (...)` does not look good.  This PR cleans up the descriptions to be one sentence that's clearer in meaning.  There's also changes to make `permission overwrite/s` consistent - some lines had `permissions overwrite/s`.

* Update src/structures/GuildChannel.js

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

* Update src/structures/GuildChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* Update src/structures/GuildChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-12-12 14:50:04 +01:00
Jan
bb04e69a92 cleanup(Guild): remove Guild#voice (#5091) 2020-12-12 14:49:32 +01:00
SpaceEEC
b509862bfa fix(UserFlags): correct early bot dev name, remove deprecated aliases (#5104) 2020-12-12 14:48:03 +01:00
Advaith
2685b960d7 docs(Client): #emojis is a BaseGuildEmojiManager (#5048) 2020-12-08 22:07:06 +01:00
monbrey
60e5a0e46f feat(Message|TextChannel): Inline replies (#4874)
* feat(Message): remove reply functionality

* feat(InlineReplies): add INLINE_REPLY constant/typing

* feat(InlineReplies): add Message#replyReference property

* feat(InlineReplies): add typings for sending inline replies

* feat(InlineReplies): provide support for inline-replying to messages

* feat(Message): add referencedMessage getter

* fix: check that Message#reference is defined in referencedMessage

* refactor(InlineReplies): rename property, rework Message resolution

* docs: update jsdoc for inline replies

* feat(Message): inline reply method

* fix(ApiMessage): finish renaming replyTo

* fix: jsdocs for Message#referencedMessage

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>

* fix: restore reply typings

* fix: dont pass channel_id to API when replying

* chore: update jsdocs

* chore: more jsdoc updates

* feat(AllowedMentions): add typings for replied_user

* fix: naming conventions

* fix(Message): referenced_message is null, not undefined

* fix(MessageMentionOptions): repliedUser should be optional

* chore: get this back to the right state

* fix(ApiMessage): pass allowed_mentions when replying without content

* fix(ApiMessage): prevent mutation of client options

Co-authored-by: almostSouji <timoqueezle@gmail.com>
Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
2020-12-08 21:08:26 +01:00
SpaceEEC
7365f40300 fix(Collector): throw an error if a non-function was provided as filter (#5034) 2020-12-08 20:11:44 +01:00
Carter
09d07553ab docs(User): fix typos in jsdoc (#5060) 2020-12-06 18:03:39 +01:00
BannerBomb
e272fd6909 fix(BaseGuildEmoji): typo in requiresColons (#5076) 2020-12-06 17:59:12 +01:00
Antonio Román
90d458820b chore(Engine): bump Node.js to v14.0.0 (#5067)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-12-06 17:58:08 +01:00
Advaith
9f3c3e0918 docs(WebSocketManager): fix type of status (#5059) 2020-11-30 01:08:54 +01:00
monbrey
6b322f47a0 fix(MessageReaction): set MessageReaction#me in patch method (#5047) 2020-11-25 23:55:29 +01:00
Amish Shah
4fcb9ebf30 fix(Voice*): filter out silent audio from video users (#5035) 2020-11-25 23:51:16 +01:00
izexi
53529bd05d fix(GuildTemplate): 'guild' getter (#5040) 2020-11-25 23:50:28 +01:00
Jan
8d650a7250 feat: BaseGuildEmojiManager (#4934)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2020-11-22 19:48:30 +01:00
Jan
12a096b5f1 fix(RoleManager): fix ID return value, change return type to collection (#4935)
Co-authored-by: Ishmaam Khan <ishmaamk@gmail.com>
2020-11-22 19:39:19 +01:00
Advaith
6f3076325e remove User#locale (#4932) 2020-11-22 19:39:06 +01:00
anandre
8c8883ef26 Remove Guild#member (#4890) 2020-11-22 19:21:01 +01:00
Junseo Park
4b555fdf4c feat(Message): added string type for message nonce (#4782)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-11-22 19:13:38 +01:00
monbrey
863734aba4 feat(GuildMemberManager): throw TypeError on incorrect GuildMemberManager#ban params (#4816)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-11-22 19:13:07 +01:00
iCrawl
1f4b9fe749 chore(Release): version up 2020-11-22 14:03:20 +01:00
Matt (IPv4) Cowley
2a6c363a8a feat(Shard): shard-specific broadcastEval/fetchClientValues + shard Id util (#4991) 2020-11-22 13:35:18 +01:00
SpaceEEC
643f96c79b fix(Guild): fetch member if already in the guild (#4967) 2020-11-21 17:16:22 +01:00
izexi
2b2994badc feat: add support for guild templates (#4907)
Co-authored-by: Noel <buechler.noel@outlook.com>
2020-11-21 15:09:56 +01:00
SpaceEEC
eaecd0e8b7 fix(User): only assign to bot initially or if info is actually present (#4990) 2020-11-20 16:48:05 +01:00
SpaceEEC
2e940e635d fix(GuildMemberUpdate): cache incoming members & use partials if enabled (#4986)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-11-20 16:20:47 +01:00
SpaceEEC
8b91ac5d7e fix(MessageReaction*Action): correctly cache incoming members and users (#4969) 2020-11-20 16:19:18 +01:00
Sugden
7faa73a561 feat: add missing error codes (#5008)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-11-20 16:18:13 +01:00
Ashley Meadows
042e071a64 fix(MessageReaction): add client property to typings (#5003)
close #5002

Co-authored-by: Ashley Meadows <itsa-sh@users.noreply.github.com>
2020-11-17 22:05:03 +01:00
HarmoGlace
b8fd3f65d9 feat(Message): add crosspostable property (#4903)
Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: Alex Hîncu <teesealz@gmail.com>
2020-11-01 12:32:20 +01:00
Christopher Bradshaw
efd7849ed0 docs: use npm ci instead of npm install (#4928)
Use `npm ci` instead of `npm install` after cloning the repository.
2020-11-01 12:30:25 +01:00
Matt (IPv4) Cowley
adf2e872f8 fix(Shard): don't pass event arguments to exit handler (#4957) 2020-11-01 12:29:29 +01:00
Matt (IPv4) Cowley
ed8b3cc9ea fix(PackageLock): reinstall GitHub docgen dev dependency (#4958) 2020-11-01 12:29:00 +01:00
iCrawl
7ec0bd93b0 chore(Release): version upgrade 2020-10-24 06:27:55 +02:00
monbrey
3d158f4448 fix(Action): attempt to get a User if GuildMember not returned (#4922) 2020-10-24 06:25:35 +02:00
Sugden
250c3ae3c1 fix(GuildChannel): parentID shouldn't be set in the constructor (#4919) 2020-10-19 22:24:18 +02:00
iCrawl
94c9cc2300 fix(Webpack): revert webpack upgrade 2020-10-19 18:46:49 +02:00
iCrawl
e9f36b5041 chore(Release): version upgrade 2020-10-19 18:27:26 +02:00
Souji
30808f9f0b feat(Message): allow custom emoji format for react (#4895) 2020-10-17 15:54:22 +02:00
Sugden
af670fc718 refactor: improve the accuracy of docs/improve docs (#4845)
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-10-17 15:53:02 +02:00
Jan
4bbe716aa0 fix(esm): add missing exports (#4911) 2020-10-17 15:47:56 +02:00
Jan
a7af4a8837 docs(PresenceData): add YouTube and remove application (#4910) 2020-10-17 15:47:49 +02:00
Noel
89feedad98 revert: "fix(GuildEmojiManager): check for guild in methods that use it" (#4912)
This reverts commit 728b3f939c.
2020-10-17 15:46:10 +02:00
Jan
728b3f939c fix(GuildEmojiManager): check for guild in methods that use it (#4886) 2020-10-17 15:40:39 +02:00
Sugden
7db6978012 fix(GuildMember): properly check permissions for hasPermissions (#4677) 2020-10-17 15:40:23 +02:00
Jiralite
6261dd65d3 fix(GuildEmojiCreate): Prevent double fire from emoji creation (#4863) 2020-10-17 15:40:04 +02:00
izexi
a45cc112e5 fix(GuildMemberManager): options.roles on 'prune' (#4838) 2020-10-17 15:39:29 +02:00
Constantinos
b8aa967226 ci: use npm ci instead of npm install (#4877)
Use npm ci instead of npm install when installing dependencies in CI.
2020-10-17 15:38:53 +02:00
Adrian Paschkowski
6e4308bfde fix(GuildChannel): Default parentID to null (#4881) 2020-10-17 15:36:16 +02:00
Adrian Paschkowski
dd12912124 fix(Actions): Avoid crash in InviteCreate with unknown channel (#4882) 2020-10-17 15:36:02 +02:00
Adrian Paschkowski
937153a92f fix(GuildMemberManager): Use actually random nonce in fetch (#4884)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2020-10-17 15:35:22 +02:00
Matt (IPv4) Cowley
c412cd7521 feat(Message): add messageEditHistoryMaxSize to limit stored msg edits (#4867) 2020-10-17 15:34:49 +02:00
cherryblossom000
4a6fb9a7d4 types(TextBasedChannel): make lastPinAt nullable (#4842)
This commit makes `TextBasedChannelFields#lastPinAt` nullable in the
typings.
2020-10-17 15:33:57 +02:00
cherryblossom000
824e92229d types(Activity): move flags from Presence to Activity (#4843)
This commit moves the `flags` property from `Presence` to `Activity` in
the typings.
2020-10-17 15:33:37 +02:00
Jiralite
0b59141054 types(GuildPreview): Make description nullable (#4854)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2020-10-17 15:33:08 +02:00
yuta0801
b9ad51049e fix(GuildChannel): make setTopic argument nullable (#4875) 2020-10-17 15:32:32 +02:00
Antonio Román
d2341654fe fix(Rest): resolved a regression, added retried AbortError (#4852) 2020-09-29 18:05:54 +02:00
Jan
169d4c3bff refactor(ReactionUserManager): use client property (#4829) 2020-09-25 23:46:31 +02:00
monbrey
13d64e6fa6 fix(MessageManager): throw if delete param is not MessageResolvable (#4825) 2020-09-25 23:46:06 +02:00
Jan
f83b3d7fc1 feat(NewsChannel): add support for following (#4805)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-09-25 23:45:47 +02:00
cherryblossom000
f2bbad36d5 feat(GuildManager): add AFK and system channel options in create (#4837)
This commit adds support for the `afk_channel_id`, `afk_timeout`, and
`system_channel_id` parameters in the
[create guild](https://discord.com/developers/docs/resources/guild#create-guild-json-params)
endpoint by adding the `afkChannelID`, `afkTimeout`, and
`systemChannelID` options in `GuildManager#create`.

This commit also fixes a minor bug in `create` when specifying types for
the channels due to the channel types not being changed from `'text'`,
`'voice'` etc to the corresponding numbers, so Discord would return an
error.
2020-09-25 23:44:32 +02:00
Matt (IPv4) Cowley
77c0788b2c fix(Shard): avoid caching null child in eval/fetchClientValue (#4823) 2020-09-25 23:43:32 +02:00
MrWasdennnoch
4e79e39e22 fix(Action): Sanity-Check if Discord includes all required data (#4841) 2020-09-25 23:42:49 +02:00
Antonio Román
32fe72f909 feat(Rest): switch queue to AsyncQueue (#4835)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-09-25 23:42:24 +02:00
Ryan Munro
1e63f3756e fix(Message): use Promise#reject instead of Throw on Message#delete (#4818) 2020-09-15 18:35:54 +02:00
MrWasdennnoch
8fa3a89482 fix(Action): Don't crash when partials are disabled (#4822) 2020-09-15 18:35:20 +02:00
Advaith
9c76129a23 feat(ActivityTypes): add Competing (type 5) (#4824) 2020-09-15 18:33:52 +02:00
Noel
01ceda5b0c chore(Deps): bl vulnerability (#4813) 2020-09-13 12:48:53 +02:00
MrWasdennnoch
eeb4c14754 fix(Partials): Use more user objects available from the gateway (#4791) 2020-09-13 12:09:12 +02:00
Johnson Chen
bcb7c721dc feat(Message): add support for crossposting (#4105)
Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: Joe <56809242+Jo3-L@users.noreply.github.com>
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-09-13 12:07:56 +02:00
dependabot[bot]
0da65becd3 chore(deps): bump node-fetch from 2.6.0 to 2.6.1 (#4812)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-13 11:57:44 +02:00
Sugden
422a4dda68 typings(Guild): document RELAY_ENABLED feature (#4788) 2020-09-08 09:58:56 +02:00
anandre
222137dcd1 docs(Role): Update various Role method descriptions (#4798)
Co-authored-by: Papaia <43409674+Papaia@users.noreply.github.com>
2020-09-08 09:58:11 +02:00
Quentin
372a405926 docs(ReactionCollector): Revise JSDoc for ReactionCollector#dispose and #remove (#4709)
Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
Co-authored-by: uhKevinMC <plainkevin123@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-09-08 09:57:39 +02:00
anandre
dfd63bdb6b docs(Guild): Guild.setName() example (#4797)
The docs example was incorrect, as the parameter is called `updated` but was later referenced as `guild`.  This PR fixes that by changing it to `updated` to match other examples, such as `setRegion()`
2020-09-05 20:18:00 +02:00
Papaia
5b39737d49 fix(lint): RESTManager warning (#4796)
Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2020-09-05 20:16:09 +02:00
cherryblossom000
904aecfdb7 types: don't use readonly arrays in interfaces (#4794)
This reverts some of the changes in f451be05 so that this works:

```ts
const embed: MessageEmbedOptions = {
  fields: [{
    // fixed stuff
  }],
};
if (/* condition */) {
  embed.fields.push({
    // conditional stuff
  });
}
```

See https://github.com/discordjs/discord.js/pull/4692#issuecomment-687252066.
2020-09-05 20:14:39 +02:00
MrWasdennnoch
a28754b892 fix(Typings): remove Partial types from some events (#4781) 2020-09-05 20:13:59 +02:00
Sugden
b43e742503 docs(GuildChannel): ThisType should be this (#4793) 2020-09-05 10:20:32 +02:00
Darqam
8ac25d37d9 docs(MessageManager): Update example for fetchPinned (#4785)
Example showed the method for channel and not messageManager
2020-09-04 20:19:51 +02:00
Souji
77b6a7d5bd fix(Util): throw token invalid for fetching rec. shard amount (#4779) 2020-09-04 12:51:15 +02:00
MrWasdennnoch
aa25608c52 typings(PartialUser): fix PartialUser remove deleted property (#4773) 2020-09-03 09:53:44 +02:00
Jan
b0ab37ddc0 feat(Channel): add isText() type guard (#4745) 2020-08-31 09:59:17 +02:00
Sugden
3141f7cb04 feat(Guild): add includeApplications option for fetchIntegrations (#4762) 2020-08-31 09:17:53 +02:00
Sugden
7ba9440053 fix(Guild): cache fetched widget data (#4760) 2020-08-31 09:16:53 +02:00
Sugden
f97316319f feat(UserFlags): add renamed UserFlags (#4761) 2020-08-30 00:34:37 +02:00
Tristan Guichaoua
405b487dc3 fix(Typing): change NodeJS.Timer into NodeJS.Timeout (#4755) 2020-08-29 18:54:39 +02:00
Tristan Guichaoua
b48b782c87 chore(Prettier): add settings for prettier plugin (#4756)
Co-authored-by: Papaia <43409674+Papaia@users.noreply.github.com>
2020-08-29 12:08:47 +02:00
cherryblossom000
74763ef3fb types: don't allow any object in the first parameter if second parameter is not given in TextBasedChannel#send (#4736) 2020-08-29 12:08:04 +02:00
Carter
74ebb650df style: remove unnecessary eslint comment (#4758) 2020-08-29 12:05:33 +02:00
Louis
a363b90fa5 docs(BaseGuildEmoji): account for optional properties (#4723) 2020-08-28 14:19:53 +02:00
Sugden
6aab9c3d64 fix: correctly import extendable classes (#4744) 2020-08-28 14:19:20 +02:00
Tristan Guichaoua
2dc70af717 types: add all types for GuildAuditLogsEntry#target (#4738)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-08-28 14:18:45 +02:00
Sugden
46acfac327 refactor(Client): remove non-existant property from toJSON (#4750) 2020-08-28 14:18:17 +02:00
Sugden
727b29c85d feat(Client): allow options for generateInvite (#4741) 2020-08-28 14:17:37 +02:00
Sugden
e0e271162c fix(typings): bot cannot be null (#4719) 2020-08-27 16:40:36 +02:00
InkoHX
cfc68677ee docs(ClientOptions): fix typo (#4730) 2020-08-27 16:39:55 +02:00
Noel
43c4d80b12 ci(CodeScanning): add CodeQL code scanning workflow 2020-08-24 19:27:00 +02:00
Carter
05c9e30163 docs(APIMessage): fix wording on comment (#4717) 2020-08-17 09:56:18 +02:00
Carter
b6167d8c3b docs: update jsdoc type for User#bot (#4716) 2020-08-17 09:45:57 +02:00
iCrawl
56e8ef2d38 chore(Release): version upgrade 2020-08-15 20:38:09 +02:00
Jan
db512d8f62 fix(User): set User#bot to false if not partial (#4706)
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-08-15 20:04:32 +02:00
Noel
5249cf33e5 revert(Shard): "fix missing child_process silent option of Shard to allow listening to output" (#4707)
This reverts commit 58d1589a55.
2020-08-15 12:50:05 +02:00
Jan
09bde74e43 chore: bump version in package-lock.json (#4705) 2020-08-15 12:38:40 +02:00
iCrawl
a4dbfdce59 chore(Release): version upgrade 2020-08-14 21:56:11 +02:00
Noel
dea48d64a5 chore(Deps): upgrade deps (#4701) 2020-08-14 21:46:23 +02:00
Advaith
178439ef8c feat: trigger userUpdate on GUILD_MEMBER_UPDATE (#4697) 2020-08-14 20:49:44 +02:00
Carter
f1194afd7c feat(GuildMemberManager#prune): roles query param (#4142)
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: kyranet <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-08-14 20:14:31 +02:00
Carter
2742923df4 feat(GuildManager): adds GuildManager#fetch (#4086)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-08-14 19:34:19 +02:00
Human
0b38c5d8b3 docs: updated applications URL (#4699) 2020-08-14 19:33:11 +02:00
cherryblossom000
f451be0519 feat(typings): use readonly arrays in parameters (#4692)
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-08-13 20:43:51 +02:00
Advaith
f991bd46f3 chore(Constants): update large_threshold default (#4698) 2020-08-13 20:38:59 +02:00
Quentin
139e56c774 docs(ReactionCollector): update remove and dispose events (#4136)
Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
Co-authored-by: uhKevinMC <plainkevin123@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-08-12 23:22:45 +02:00
Androz
e7eda72c9d feat(typings): add number type for setExplicitContentFilter method (#4694) 2020-08-12 23:18:58 +02:00
Sugden
980243f2d5 fix(Partials): correctly set properties as nullable (#4636) 2020-08-12 21:26:59 +02:00
Sugden
b6ddd4ce41 fix(APIMessage): add reply user to allowedMentions (#4591) 2020-08-12 21:25:38 +02:00
Arthur
6caeaeb391 fix(MessageReactionAdd): prevent double messageReactionAdd triggering (#4682)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-08-12 21:24:45 +02:00
Carter
290938bf80 feat: bypass cache check with forceFetch param (#4592) 2020-08-12 21:23:04 +02:00
Souji
0225851e40 feat(BitField): add problematic bit to error (#4617) 2020-08-12 12:37:01 +02:00
Sardonyx
2a7f749d5a docs(Embeds): Added descriptions to the typedefs (#4303)
Co-authored-by: RDambrosio <rdambrosio016@gmail.com>
2020-08-12 12:29:02 +02:00
Advaith
57ca3d7843 feat(Guild): updates for Community guilds (#4377)
Co-authored-by: SpaceEEC <spaceeec@users.noreply.github.com>
2020-08-12 12:21:17 +02:00
Advaith
de8d26d791 docs(Constants): Improve large_threshold description (#3744)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-08-12 12:17:13 +02:00
Advaith
5be6630843 feat(Guild): discovery splash (#4619)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2020-08-12 11:09:18 +02:00
Advaith
446bbfe9eb docs(Ban): days must be 0-7 (#4693)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
2020-08-12 09:35:33 +02:00
Tristan Guichaoua
f2f31a14c9 feat(types): BitFieldResolvable use ReadonlyArray (#4604) 2020-08-12 09:34:24 +02:00
Sugden
e92cbc444b feat: deprecate GuildEmbed methods and properties in favour of GuildWidget (#4121) 2020-08-12 09:33:00 +02:00
Advaith
baffbdb541 fix(Integration): user might not be present (#4691)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2020-08-12 09:30:34 +02:00
Bence
b7740d4859 feat(GuildEmoji): cache the author (#4334)
Co-authored-by: Papaia <43409674+Papaia@users.noreply.github.com>
2020-08-12 09:27:00 +02:00
Souji
599cde3627 fix(GuildChannel): make lockPermissions use parent overwrites (#4627)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2020-08-12 09:23:31 +02:00
Advaith
bd2bb0e1c7 docs(Welcome): change discord badge to shields.io for consistency (#4633) 2020-08-12 09:22:44 +02:00
samsamson33
03580b23a3 feat(Util): add missing colors to docs (#3843)
Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-08-11 23:40:07 +02:00
Jan
9d747d14c5 docs(Client): fix docs for login method (#4350) 2020-08-11 23:36:25 +02:00
Nathan Franke
124afeb843 fix(Collector): support async (#4123) 2020-08-11 23:34:47 +02:00
Hayden Andreyka
05cbf70486 docs(Guild): clarify vanity URL documentation (#4125)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-08-11 23:05:03 +02:00
Jared Gesser
58d1589a55 fix missing child_process silent option of Shard to allow listening to output (#4308) 2020-08-11 23:01:19 +02:00
Sugden
49ad279c52 refactor(GuildMemberManager): use data instead of query (#4370) 2020-08-11 23:01:02 +02:00
Erwann Hilley
1fbaf8816e feat: add Blob support for browser (#4338)
Co-authored-by: Papaia <43409674+Papaia@users.noreply.github.com>
2020-08-11 23:00:12 +02:00
Souji
b4d651055a fix(BaseManager): properly type valueOf (#4594) 2020-08-11 22:59:44 +02:00
Sugden
c5b6c4da43 fix: correctly import VoiceState (#4616) 2020-08-11 22:59:03 +02:00
Jan
f628981f42 docs(CategoryChannel): Fix children being incorrectly marked as nullable (#4620) 2020-08-11 22:58:30 +02:00
Souji
a663ea4d2c fix(ApiMessage): respect allowedMentions with split (#4588) 2020-08-11 22:57:12 +02:00
Zaid - Nico
2be68e4125 fix(Message): Message#createdTimestamp uses deconstructed message id to get timestamp (#4632) 2020-08-11 21:02:15 +02:00
Souji
317f24076e fix(Util): support empty array for flatten (#4590) 2020-08-11 21:01:29 +02:00
Souji
fab3153de6 fix: consider #nsfw false if not present in data (#4593) 2020-08-11 21:00:29 +02:00
Souji
276dddcbfb fix(PresenceStatus): include invisible in typings (#4585) 2020-08-11 20:59:47 +02:00
Souvik
2adb5815bf fix: set #nickname to null as the default value (#4641) 2020-08-11 20:58:52 +02:00
tiehm
3df99930e8 fix(Typings): Channel#delete returns bad type (#4118) 2020-08-11 20:58:12 +02:00
Matthew Stead
e54c21bc65 feat(typings): TypeScript support for changing $browser (#4667) 2020-08-11 20:57:42 +02:00
Souji
bbfc715821 fix(Message): include MessageEmbed type (#4675) 2020-08-11 20:56:01 +02:00
Sanskar Jha
755f3798d1 docs(examples): fix example img (#4678) 2020-08-11 20:55:05 +02:00
Arthur
5b716c5b0c docs(ReactionManager): clarify cache Collection keys type (#4683) 2020-08-11 20:54:14 +02:00
Jan
b0e53e9c6d docs(Message): add NewsChannel type to Message#channel (#4680) 2020-08-11 20:53:29 +02:00
Androz
c55b5c8c19 fix(typings): correct spelling of APIError (#4687) 2020-08-11 20:52:10 +02:00
모메MoMe
fb1dd6b53a fix(Util): Fix cleanContent mention exploit (#4663) 2020-07-29 12:47:20 +02:00
Jan
0e61fca974 docs: make use of MessageResolvable type for bulkDelete (#4661) 2020-07-29 12:15:23 +02:00
camc
2b6e6d8631 feat(Module): add ReactionManager to exports (#4372)
add ReactionManager to the manager exports in src/index.js

closes #4363
2020-07-17 10:20:51 +02:00
Tenpi
47151fc2a9 fix(typings): allow custom events (#4162) 2020-07-17 10:17:44 +02:00
Souji
5027787aec chore: add relevant client options section to issue template (#4587) 2020-07-17 10:16:37 +02:00
Souji
c79ac4d9fc feat(Message): support pin and unpin with reason (#4586)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-07-17 10:13:30 +02:00
Souji
f9f3661090 fix(User): type dmChannel as nullable (#4609) 2020-07-06 19:07:33 +02:00
Crawl
ae716872b9 chore(deps): remove peer-deps as per npm@7 (#4272) 2020-06-19 11:48:01 +02:00
Phineas
ea19faa411 Change domain to discord.com (#4160) 2020-06-19 11:46:59 +02:00
Papaia
9a1c56c5b9 docs(erlpack): discordapp to discord (#4288)
Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2020-06-19 11:46:29 +02:00
Jan
214981f0b1 feat(MessageMentions): fix typings/docs, add resolvables support (#4339) 2020-06-19 11:43:19 +02:00
Souji
16847a3c13 fix: typing start event emitting on non text based channels (#4349) 2020-06-19 11:42:06 +02:00
uhKevinMC
54a7fdadda feat(voiceState): add self_video property (#4346) 2020-06-19 11:41:11 +02:00
Papaia
1c275afd7c fix(Guild): fix vanityURLUses desc, internally use fetchVanityData (#4335)
* docs(vanityURLUses): use fetchVanityData

* feat(fetchVanityCode): internally call fetchVanityData

* Update src/structures/Guild.js
2020-06-04 19:17:18 +02:00
Johnson Chen
8030612e52 feat(Guild): add fetchVanityData (#4103)
* chore: deprecate Guild.fetchVanityCode()

* feat: add Guild.fetchVanityData()

* chore: update typings

* fix: remove redundant .then()

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>

* chore: fix lint

* chore: util.deprecate fetchVanityCode

* feat: add VanityData typedef and populate vanityURLUses

* chore: update typings

* chore: properly deprecate fetchVanityCode

* chore: fix jsdoc description for fetchVanityData

* feat: make fetchVanityData an async function

* chore: update Vanity typedef

* docs: update jsdoc

* feat: throw vanity url error instead of returning rejected promise

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* docs: disable max-len rule and add info about receiving parameter

* fix: throw Error instead of rejecting Promise

* revert: revert "fix: throw Error instead of rejecting Promise"

This reverts commit 7ffd53eba4.

* fix: require DJSError to fix throwing VANITY_URL error

* nitpick: re-add TypeError to the import

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

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2020-06-04 13:41:20 +02:00
Carter
257371da28 feat(REST): allow options.query as URLSearchParams (#4143)
* feat: support query as URLSearchParams

* style: remove unnecessary comment

* patch: use const

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* feat: not reconstructing the search params

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-06-04 13:34:29 +02:00
nolan
5955498aca fix(DataResolver): resolveInviteCode to support new domain (#4281)
Update resolveInviteCode method to support "discord.com/invite" links.
2020-06-04 13:22:26 +02:00
Papaia
fc4bddf82a fix: grammatical errors in INVALID_TYPE errors (#4289)
* fix(GuildMemberRoleManager): grammatical error

* fix: eslint

* fix(GuildChannel): an

* fix(PermissionOverwrites): an

Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2020-06-04 13:02:28 +02:00
Souji
bd349650a7 docs(Guild): description of Guild#premiumSubscriptionCount (#4324) 2020-06-04 12:56:48 +02:00
Sugden
88a62d5fea docs(GuildManager): resolve returns a GuildChannel (#4333) 2020-06-04 12:52:43 +02:00
Evan
b0b62d63cf chore(docs): remove comment about type 13 (#4159) 2020-05-21 13:18:06 +02:00
Sugden
15b53509da fix(APIMessage): only pass allowedMentions if content is defined (#4269) 2020-05-21 13:17:00 +02:00
Schuyler Cebulskie
153a030c1f Improve text for Discord server link in issues 2020-05-17 02:51:28 -04:00
Papaia
2583ad5da7 docs(WebSocketShard): add missing properties (#4268) 2020-05-09 17:23:32 +02:00
SpaceEEC
a6510d6a61 revert "chore(docs): example for timeout in message.delete()" (#4167) 2020-05-07 23:39:45 +02:00
SpaceEEC
407bc77d34 fix: in/de-crement max listener for client events (#4168) 2020-05-07 23:39:23 +02:00
Alexander Kashev
766b91d306 docs(ShardingManager): fix typo in JSDoc (#4158)
Fix typo introduced in PR #4157 in the link to Node docs
2020-05-05 22:45:30 +02:00
anandre
b385aedf36 chore(docs): example for timeout in message.delete() (#4165) 2020-05-05 22:41:41 +02:00
Alexander Kashev
99612ba14d docs(ShardingManager): remove experimental status of Worker threads (#4157) 2020-05-04 13:08:52 +02:00
Kevin
ec0227a476 feat(GuildMemberManager): nonce and chunk_count for _fetchMany (#4130)
Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2020-05-04 12:48:33 +02:00
anandre
2617d3c9f3 docs(VoiceState): remove permissions required from description (#4156) 2020-05-04 12:46:58 +02:00
Carter
6367f603f6 typings: Add User#fetchFlags (#4138) 2020-05-01 14:45:14 +01:00
sillyfrog
d3c9384c9c fix(Voice): correctly set speaking data in the voice ssrcMap
Co-authored-by: Sillyfrog <sillyfrog@users.noreply.github.com>
2020-04-30 17:21:29 +01:00
Carter
026691702d feat(Guild#fetch): withCount param (#4111) 2020-04-27 09:05:39 +02:00
Corentin Poupry
605ee8587b fix(MessageEmbed): explicitly mark proxyIconURL as undefined (#4097) 2020-04-26 17:02:45 +02:00
Alon L
819e04a7ab fix(Typing): dmChannel bulkDelete (#4115)
Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-04-26 15:59:30 +02:00
Sugden
46b9e25190 typings(User): mark locale and flags as optional (#4127) 2020-04-26 15:58:53 +02:00
Nathan Franke
1726651c71 chore(tooling): include mention of commit convention (#4124) 2020-04-24 12:02:04 +02:00
Alon L
e3303ac3a2 fix(Typing): setSpeaking public (#4109) 2020-04-24 08:44:37 +01:00
Crawl
67a74c33e1 fix(Webpack): add Buffer polyfill in browser (#4102) 2020-04-20 21:15:26 +02:00
Papaia
97cbbb176b fix(Guild): name acronym (#4104) 2020-04-20 21:15:14 +02:00
RDambrosio
5af1a552bc fix(PacketHandler): guild members chunk packet handler should… (#4092) 2020-04-19 12:25:32 +02:00
SpaceEEC
97d23de247 fix(Typings): add optional Set<Snowflake> to shardReady event (#4099) 2020-04-19 12:24:58 +02:00
Souji
863a70918a docs(Message): add timeout to Message#delete example (#4090) 2020-04-18 12:16:19 +02:00
Jyguy
6fbaf0a036 fix(User): jsdoc for User#flags (#4094) 2020-04-18 12:15:30 +02:00
iCrawl
d827544fbd chore(Release): version 2020-04-17 12:58:26 +02:00
thepheer
12187efdbd feat(DataResolver): prefer streams over buffers (#4075)
* feat(DataResolver): prefer streams over buffers

* feat(DataResolver): add `resolveFileAsBuffer`

Add `resolveFileAsBuffer` to use it in `resolveImage` which still requires Buffers to work.

* fix(DataResolver): make sure `resolveFile` always returns a Promise

* refactor(DataResolver): use for-await-of

* fix(DataResolver): use forked form-data which supports custom streams

* fix(APIRequest): use forked form-data in code too

Co-authored-by: - <5144598+-@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-04-17 12:03:50 +02:00
Ryan Munro
7c6000c5e3 feat(ClientOptions): allow setting default allowedMentions (#4085)
* feat(ClientOptions): add default allowedMentions

* feat(ClientOptions): use default allowedMentions when not provided

* Update src/structures/APIMessage.js

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* Update src/structures/APIMessage.js

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* fix(ClientOptions): default allowedMentions should be undefined

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-04-17 11:23:31 +02:00
HarmoGlace
a88b7239b5 docs(RoleManager): everyone role can't be null (#3995)
* docs(RoleManager) : fix jsdoc everyone role can't be null

It fixes the jsdoc of RoleManager ; the everyone role of a guild can't be null

* Everyone role can't be null

* fix(typings): mark RoleManager#everyone as non-null

Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-04-16 12:18:43 +02:00
Duncan Sterken
0a3759f683 feat(ESModules): importing for esm modules (#3998)
* fix: importing for esm modules

* style: use single quotes

* refactor: remove 'use strict'
2020-04-16 12:11:24 +02:00
Sardonyx
da5d92812e docs(Webhook): id and token information (#3962)
* Documented how to get ID and Token of a webhook

* Update docs/examples/webhook.js

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* Explained whats the response body

* Update docs/examples/webhook.js

Co-Authored-By: Crawl <icrawltogo@gmail.com>

* Update docs/examples/webhook.js

Co-Authored-By: Crawl <icrawltogo@gmail.com>

* Update webhook.js

* Capitilized ID

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-04-16 12:09:26 +02:00
Kevin
ff3454ef89 feat(GuildMemberManager): customisable timeout for _fetchMany (#4081) 2020-04-16 12:07:32 +02:00
SpaceEEC
4625881c54 docs(MessageEmbed): document the constructor (#4077) 2020-04-16 12:07:08 +02:00
SpaceEEC
4c2308b4c6 docs(MessageManager): document return type of delete (#4012)
* docs(MessageManager): document return type of delete

* docs(MessageManager): use Promise<void> over Promise

Co-Authored-By: Papaia <43409674+ItsPapaia@users.noreply.github.com>

Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2020-04-16 11:57:03 +02:00
SpaceEEC
7ce58dbd4a docs(ShardClientUtil): link Shard#message from send method (#4028)
* docs(ShardClientUtil): link Shard#message from send method

* docs(ShardClientUtil): use @ emits instead of @ link
2020-04-16 11:56:42 +02:00
Ron B
2388467bd3 chore(Typings): stricter def for Client#emit (#4087) 2020-04-16 11:52:52 +02:00
withmask
d7096569c8 fix(PermissionOverwrites): resolveOverwriteOptions description (#4088)
smoll update
2020-04-16 11:52:06 +02:00
Advaith
fcacf1bc0d fix(Guild): sort text, news, and store channels together (#4070) 2020-04-16 10:35:19 +02:00
Carter
2e5a6476d5 feat: User#flags (#4060)
* feat: user flags

* fix: unnecessary negated statement

* fix: wording for description

* fix: an vs. a

* feat: add verified bot and dev flags

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* typings :verified bot and dev flags

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* feat: mon's suggestion, async fetchFlags & jsdoc

* feat: added to index.js

* fix: typo

* style: leveled flags

* typings: update leveled flags

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2020-04-16 10:32:15 +02:00
cherryblossom000
72a33cb8c2 fix(Typings): GuildPreview#features and Integration#type (#4080)
* fix(Typings): make GuildPreview#features an array

* fix(Typings): make Integration#type a string
2020-04-16 10:31:40 +02:00
SpaceEEC
72a7f2b3ed fix(ClientApplication): type fetchAssets as resolving with an a… (#4078) 2020-04-16 09:27:52 +02:00
SpaceEEC
a8db9884d5 feat(Message): add allowedMentions to MessageEditOptions (#4071) 2020-04-16 09:27:19 +02:00
Roki
1330e2d246 feat: add supported 4096 image size and jpeg format (#4031)
* add 4096 avatar size that discord supports

* jpeg is also a thing

* update jsdocs

* update typings and remove duplicate type
2020-04-12 22:20:31 +02:00
Jyguy
9ba4eff279 fix(StreamDispatcher): correct property types (#4059)
* typings(StreamDispatcher): correct property types

* typings(StreamDispatcher): order methods alphabetically
2020-04-12 20:58:53 +02:00
Vlad Frangu
e5fac8c32f chore(WebSocketShard): log Discord requested reconnects (#4066) 2020-04-12 20:57:50 +02:00
Quentin
a07c3c2f94 fix(BaseManager): remove declaration of remove method (#4069)
The BaseManager#remove method doesn't exist, but was in the BaseManager typings.
2020-04-12 20:54:34 +02:00
SpaceEEC
828640ca26 ci(Testing): add TypeScript test job (#4002)
* ci(Testing): add TypeScript job

* chore: add eol before eof
2020-04-04 14:11:59 +02:00
SpaceEEC
9e4c39ae53 fix(Message): update MessageMention's roles on message edit (#4016) 2020-04-03 21:30:49 +02:00
Amish Shah
0e44ecd420 chore: fix typings/docs for VoiceBroadcast (#4014) 2020-04-03 11:19:24 +01:00
Advaith
849c6324d3 feat(Guild): PUBLIC_DISABLED and WELCOME_SCREEN_ENABLED features (#4009) 2020-04-03 11:59:51 +02:00
Syntle
691e96c5cf fix(Presence): add missing userID property to declarations (#4013)
* Added `userID` property to `Presence` class

userID property exists in docs but not in typings

* fix(Presence): userID should be typed as Snowflake

Co-Authored-By: BorgerKing <38166539+RDambrosio016@users.noreply.github.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: BorgerKing <38166539+RDambrosio016@users.noreply.github.com>
2020-04-03 11:57:50 +02:00
iCrawl
6544d22338 chore(Release): version 2020-03-27 22:25:33 +01:00
SpaceEEC
5e491260a1 fix(Typings): use Channel instead of *ChannelTypes in ClientEve… (#4001) 2020-03-27 22:23:46 +01:00
iCrawl
f16a0790ca chore(release): version 2020-03-27 21:04:59 +01:00
SpaceEEC
b441469044 revert: channel unions (#3918 69d69f2) (#3978)
* revert: channel unions (#3918 69d69f25b9)

* fix: correct tslint:disable

* revert: keep the GuildChannel#setParent change

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-03-27 20:58:11 +01:00
SouSinner
88133d0d77 feat(GuildPreview): implement support for "preview" endpoint (#3965)
* feat(GuildPreview): method — fetchGuildPreview

* feat(GuildPreview): structure — GuildPreview

* feat(GuildPreview): update typings

* fix(GuildPreview): remove typedef for Features — already exists

* refactor(GuildPreview): update JSDocs & method

* feat(GuildPreview): implement DiscoverySplash function

* fix(GuildPreview): description & error handling for id

* fix(GuildPreview): misleading description, assign emojis correctly

* feat(GuildPreview): func DisplaySplash & GuildPreviewEmoji interface

* fix(Typings): satisfy TSLint

* fix(GuildPreview): toJSON - returns a value now

* feat(GuildPreview): add fetchPreview method on instance of Guild

* feat(GuildPreview): update typings

* fix: missing client constructor

* fix: typo in typings

* feat(BaseEmoji): implement BaseEmoji — parent for emoji instances

* feat(BaseEmoji): refactor - GuildEmoji extends BaseEmoji now

* feat(BaseEmoji): refactor - adjust emojis prop to BaseEmoji instance

* feat(BaseEmoji): not documented fully - GuildPreviewEmoji

* feat(BaseEmoji): update typings

* fix: remove duplicate typing properties - inherited

* fix: remove redundant methods & properties - inherited / already set

* fix: let -> const

* fix: typings - put BaseEmoji after BaseClient

* fix: remove _clone method  - redundant

* refactor(GuildPreview): emojis should be a collection

* refactor: rename base class, move relevant props there and expose roles

* fix(GuildPreview): update emojis in _patch

* fix(Typings): remove empty line, add Client#fetchGuildPreview

* feat: export GuildPreview

* fix(Typings): add GuildPreview#discoverSplash, icon, and splash

Co-authored-by: LxveFades <twitchisadeck@gmail.com>
Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-03-27 20:57:28 +01:00
Jyguy
fee9a218e8 docs(MessageMentionTypes): move possible values to description (#3990)
* docs(MessageMentionTypes): correct type

* docs(MessageMentionTypes): change role to roles

* docs(MessageMentionOptions): correct description to allow usage as an array

* remove unneeded part of description

Co-Authored-By: Ryan Munro <rsm999@uowmail.edu.au>

* docs: add DisableMentionType to remove literal string types

Co-authored-by: Ryan Munro <rsm999@uowmail.edu.au>
2020-03-27 20:54:27 +01:00
Carter
51ff5ddb64 chore: incorrect word in issue template (#3996) 2020-03-26 11:33:11 +01:00
didinele
65e8c92d7c fix(WebsocketShard): pass ignore ACK when Discord asks for a beat (#3993) 2020-03-25 12:55:20 +01:00
Ryan Munro
f2fdb93318 fix(Typings): client message event should not emit PartialMessa… (#3983)
* fix(Typings): client message event should not emit PartialMessage

* Update typings/index.d.ts

Co-Authored-By: Jyguy <jskekkx@gmail.com>

Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: Jyguy <jskekkx@gmail.com>
2020-03-23 08:36:27 +01:00
Sugden
5da734c3d4 typings: add back accidental removal (#3984) 2020-03-23 08:30:04 +01:00
Jyguy
993411d9fe docs(MessageReaction): fix jsdoc for count (#3980) 2020-03-22 20:09:31 +00:00
SpaceEEC
215740157b fix: always emit guildUnavailable when a guild becomes unavailable (#3975) 2020-03-21 11:31:34 +00:00
Crawl
645e09e859 chore(ci): buggy void return rule 2020-03-21 09:54:58 +01:00
C eq Q divided-by U
495cfa96c2 fix(TypingStart): typing methods returning falsy values (#3939)
* fix: typing methods returning falsy values

* fix: eslint

* fix: no provided parameters; updated jsdocs

* fix(Typings): reflect typingStop

* refactor: since and lastTimestamp merged into one constructable value

* feat(Typings): document Channel#_typing

* feat: emit TypingData on typingStart; update jsdocs

* feat(Typings): move _typing to TextBasedChannel; sort props alphabetic

* feat(Event): remove typingStop

* feat(Typings): update typings - remove typingStop

* feat(Event): remove typingStop from Constants

* feat(Typing): remove TypingData class - redundant

* refactor(Events): remove TYPING_STOP event

* refactor(TypingData): now is an interface for _typing

* fix(TypingStart): timeout variable, removed emit for TypingData

* feat(Typing): timeout property on Channel#_typing, remove redundancy

* fix(Typings): extra overload(s)

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* Update index.d.ts

* fix(Typings): remove "private" from interface — invalid TS

* feat(Typings): add PartialUser in case partials are enabled

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* feat(Typings): document 'timeout' property of TypingData

Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-03-21 09:52:40 +01:00
Advaith
0f38d807c7 fix(Guild): default max presences value (#3970) 2020-03-21 09:02:12 +01:00
Ryan Munro
df324e2c21 feat(AllowedMentions): add support for MessageOptions#allowedMe… (#3893)
* feat(Allowed Mentions): Add support for new Allowed Mentions message options

* fix(docs): Update JSDoc for feature

* fix(apimessage): translate the propery into snake_case

* fix(typings): message mention options should be optional

* fix(docs): jsdoc typings for MessageMentionOptions

* fix(mentions): use Resolvables for MessageMentionOptions

* fix(docs): typedef for MessageMentionTypes

* Update typings/index.d.ts

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix(mentions): drop support for Resolvables

* fix(AllowedMentions): remove the whole resolve function

* fix(docs): revert change to Resolvables

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-03-19 11:56:03 +01:00
uhKevinMC
cd52424fb7 docs(VoiceState): improve phrasing of setChannel method (#3959)
* (docs) Fixed phrasing of docs

Added permission needed to edit a member's voice state and adjusted docs to say **"Disconnect"** instead of **"Kicking"** the member.

* fixed line length on 156
2020-03-19 11:51:40 +01:00
KhaaZ
5b9cdc5cd2 feat(Permissions): Adds VIEW_GUILD_INSIGHTS (#3928) 2020-03-17 21:37:40 +00:00
Sugden
a6605155f0 typings/fix(Partials): fix unexpected TSC errors (#3957) 2020-03-17 20:01:26 +01:00
Sugden
a5267e1163 docs(MessageEmbed): correct description of createdAt (#3897)
* docs(MessageEmbed): correct description of createdAt

* typo
2020-03-17 19:04:46 +01:00
Sugden
8b906c69bb fix(Partials): correctly document properties for partialized st… (#3922)
* fix(Partials): properly document partial properties

* style: turn tabs into spaces

* style: order properties alphabetically

* fix(typings): PartialDMChannel will always have a recipient

* change properties to undefined instead of null

* docs: correctly mark properties

* style: remove tabs

* fix(partials): document properties properly

* style: tabs

* style: random line

* docs(User): tag is nullable

* typings(User/GuildMember): document lastMessageID properly

* typings/fix: change lastMessageID to lastMessageChannelID

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-03-17 18:59:47 +01:00
izexi
8c0a940cdb fix(Channel): ensure partial DMChannels get created (#3954) 2020-03-17 18:52:59 +01:00
izexi
a36a65b36a fix(MessageReaction): fetching a removed partial custom emoji (#3955)
* fix: handling GuildEmoji within fetch()

* refactor: remove unused "private" methods

* refactor: make use of Message#fetch() to patch
2020-03-17 18:52:43 +01:00
Daniell
2be9ebaad2 feat(typings): allow event listener type param inference (#3944)
* feat: allow listener type param inference

* fix: typo

* fix: invalid listener type

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix: intellisense (user should extend interface)

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-03-17 18:52:11 +01:00
Crawl
7994b5612a docs(PlayInterface): update example for broadcast
Co-authored-by: Carter <45381083+Fyko@users.noreply.github.com>
2020-03-17 09:13:19 +01:00
SpaceEEC
7b38f46caf fix(RequestHandler): a global timeout implies limited (#3950) 2020-03-17 09:02:51 +01:00
Joe Villegas
609a545131 typings(StreamDispatcher): remove end event (#3945) 2020-03-17 09:02:43 +01:00
Sugden
a53404fac3 typings(PartialTextBasedChannelFields): fix send overload (#3942) 2020-03-15 19:14:10 +01:00
Ryan Munro
69d69f25b9 feat(Types): support type-guarding using Channel#type string li… (#3918)
* feat(types): union type for Channels

* feat(Types): union for TextBasedChannelTypes

* fix(Types): use new union types in return values

* Update typings/index.d.ts

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* Update typings/index.d.ts

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix(Types): various minor improvements for Partials

* fix(GuildChannel): partial should return false

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-03-14 16:50:43 +01:00
Sugden
44ac5fe6df fix(Util): cleanContent should remove mentions after formatting… (#3936) 2020-03-14 13:39:54 +01:00
Sugden
d43f78c845 typings(PartialTextBasedChannelFields): fix send overloads (#3935)
* typings(PartialTextBasedChannelFields): Remove duplicate types for parameters

* typings(PartialTextBasedChannelFields): fix overloads for send

* style: add semicolons and remove whitespace
2020-03-14 13:39:22 +01:00
vzwGrey
e5264aba37 fix(GuildMemberRolesManager): type error should mention Role an… (#3931)
* fix(GuildMemberRoleManager): type error should mention that Role or Snowflake are fine too

* fix(GuildMemberRoleManager): comma instead of 'or'

* style: break long line
2020-03-14 13:38:51 +01:00
SpaceEEC
ca75eb509a fix(GuildEmojiManager): throw an error if image resolving fails (#3934)
* fix(GuildEmojiManager): throw an error if image resolving fails

* refactor(GuildEmojiManager): remove redundant if branch
2020-03-14 11:44:08 +01:00
Sugden
5b8f02243c typings(Client): remove typingStop event (#3919) 2020-03-14 11:41:05 +01:00
iCrawl
76634db9be chore: use cross-env to set env vars 2020-03-08 20:18:40 +01:00
iCrawl
36050d07f5 chore: release version 12.0.2 2020-03-08 20:06:30 +01:00
SpaceEEC
a4f7e07b3b fix(APIRequest): only use form data when actually sending files (#3917) 2020-03-08 19:28:19 +01:00
Bence
79a28b55a8 docs(Structures): add ExtendableStructure typedef (#3908)
* docs(Structures): add ExtendableStructure typedef

* revert automatical package.json change
2020-03-08 19:28:03 +01:00
Crawl
b5dfb55923 docs: make collections more accessible in docs (#3907)
Fixes #3896
2020-03-08 19:27:42 +01:00
SpaceEEC
69d415301d perf(VoiceConnection): skip redundant volume transformer on join (#3916) 2020-03-08 17:40:06 +00:00
Matt (IPv4) Cowley
3e169cb4d3 fix(MessageEmbed): skip validation of fields when inside a message (#3894)
* fix(MessageEmbed): Add skipValidation flag to MessageEmbed

* fix(MessageEmbed): Use skipValidation flag in Message

* fix(MessageEmbed): Restore static normalizeField(s) methods

* fix(MessageEmbed): Update typings for constructor

* fix(MessageEmbed): Remove private docstrings/typings

* fix(MessageEmbed): Use skipValidation without storing in instance

* fix(MessageEmbed): skipValidation without modifying normalizeFields

* fix(MessageEmbed): Revert indentation change in typings

* fix(MessageEmbed): Clone logic from normalizeFields (duplicated code ftw)

* revert(MessageEmbed): remove dead code / breaking change

- dead code
  discord.js does not use those methods interally and won't in the future, as Discord
  does not emit any partial embed updates and doing so in the future seems unlikely.
- a breaking change (an incompatible api change)
  Although it's not recommended to do, users can modify
  received embeds without cloning them, e.g.:
  const embed = message.embeds[0].addField('some title', '');
  (replace '' with some function call; this is just an example)
  This would no longer throw a synchronous error (breaking change),
  but at a later point when actually sending it. (poorer to debug)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-03-08 17:24:18 +01:00
Silver Shadow
3c653aafe8 docs(GuildMemberResolvable): an member -> a member (#3909)
an member -> a member
2020-03-08 16:00:43 +01:00
SpaceEEC
f387337787 fix(Guild): resolve role id and call existing handler (#3904) 2020-03-07 06:06:58 +01:00
Sugden
9b5f005394 test: update tests (#3865)
* test: update tests

* style: fix indent

* test: suggested changes

* test: require correct directory

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-03-07 06:05:57 +01:00
SpaceEEC
bca4b038a5 docs(BitField): document constructors of deriving classes (#3903) 2020-03-07 06:00:48 +01:00
Spooder
b5a7e5cdf0 docs(sharding): ShardingManager#createShard doesn't spawn the s… (#3875)
* Fixed createShard() to show an example!

* docs(ShardingManager): clarify createdShard docs

* docs(Shard): clarify manager parameter

* docs(ShardingManager): use an info tag for createShard's param

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-03-07 06:00:11 +01:00
Souji
61ef46ff30 fix: adapt #manageable to check for CONNECT for VoiceChannel (#3885) 2020-03-06 07:00:49 +01:00
iCrawl
0066d0089e chore: pascal-case in scope 2020-03-04 20:33:18 +01:00
Advaith
bfcd4befc9 docs(faq): replace ffmpeg-binaries with ffmpeg-static (#3886) 2020-03-03 12:29:56 +00:00
Amish Shah
11f30ccb31 v12.0.1 2020-03-01 22:33:21 +00:00
Jisagi
66e625c4c0 fix(guild): VerificationLevels (#3873) 2020-03-01 21:28:03 +01:00
SpaceEEC
cd746f3069 fix(message_mentions): lazy require GuildMember to avoid circular (#3877) 2020-03-01 20:27:47 +00:00
Crawl
1336156799 chore(ci): deploy docs for tags (#3878) 2020-03-01 21:25:29 +01:00
Amish Shah
2338594030 Merge branch 'master' into stable 2020-03-01 18:02:24 +00:00
Amish Shah
3142d8cf18 v12.0.0 2020-03-01 18:01:39 +00:00
Amish Shah
a133768618 v12.0.0 2020-03-01 18:00:39 +00:00
Amish Shah
7d40c43ad4 chore: merge v12-dev master into stable 2020-03-01 17:57:30 +00:00
Amish Shah
d7c5baf7f3 chore: update discordjs/discord.js references 2020-03-01 17:38:25 +00:00
Saya
f4b1b398d9 feat: document intent error code messages (#3871)
* Add 4013, Invalid Intents close code

* Add 4014, Disallowed Intents Code

* Add error messages for 4013 & 4014

* Rephrase invalid & disallowed intent error message

* Rephrase disallowed intent error message
2020-03-01 17:21:48 +00:00
Souji
2d67fbb24c docs: clarify which checks GuildMember#manageable does (#3870) 2020-03-01 15:11:06 +01:00
SpaceEEC
544bb78c8b refactor: make LimitedCollection an implementation detail (#3872) 2020-03-01 15:10:55 +01:00
Sugden
c7f4485cec docs(PartialRoleData): id is optional (#3866) 2020-03-01 15:10:46 +01:00
SpaceEEC
d72172744e v11.6.1 2020-02-29 19:13:53 +01:00
Anish Shobith P S
34d352dcbe docs: bump version to 11.6.0 (#3863)
* docs: Bump version to 11.6.0

* fix: typo
2020-02-29 19:11:42 +01:00
SpaceEEC
713309e7bb fix(playinterface): lazy require VoiceBroadcast to avoid circul… (#3864) 2020-02-29 19:07:23 +01:00
Souji
acdd832fe2 fix(typings): enum values for ChannelType (#3861) 2020-02-29 18:58:20 +01:00
Souji
09e4912a90 fix(typings): remove duplicate VerificationLevels (#3862) 2020-02-29 18:58:11 +01:00
Souji
a6d3501ff8 fix(typings): for intents (#3860)
* re-introduce Intents export
* properly type WebsocketOptions#intents
2020-02-29 18:18:59 +01:00
SpaceEEC
b3931eaebb v11.6.0 2020-02-29 15:28:37 +01:00
SpaceEEC
08e7328b86 docs(readme): remove mention of uws 2020-02-29 15:26:27 +01:00
Souji
8a2f8938be feat: Intents bitfield (#3844)
* feat: Intents bitfield

* suggestion: properly construct Intents.ALL

* fix: actually document the ws option

* suggestion: remove disabledEvents in favor of intents

* suggestion: remove obsolete check, validate falsy values

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* fix: GUILD_BANS flag

* fix: exception for intents check in ws options

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* docs: IntentsResolvable

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* Update Client.js

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-29 15:20:15 +01:00
iCrawl
b58813ace8 chore(*): update node version mention & use strict 2020-02-29 15:19:37 +01:00
didinele
d33fc741e3 typings: Refactor how channel types are done (#3808)
* refactor channel types

* really weird solution to make what the PR promises possible, I might revert this

* undo the dumb attempt

* Update index.d.ts

* fix GuildCreateChannelOptions#type

* fix(typings): remove initializers from the enum

* Update index.d.ts

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-29 15:11:56 +01:00
Sugden
a04b4cae3e docs(TextBasedChannel): fix typo (#3858) 2020-02-29 15:11:06 +01:00
SpaceEEC
31ee0d84d5 docs(shard): add .cache to GuildManager in fetchClientValue exa… (#3857) 2020-02-29 15:10:47 +01:00
iCrawl
d9e12b8bc2 fix(guild): import paths 2020-02-29 14:40:13 +01:00
Crawl
c065156a88 chore: consistency/prettier (#3852)
* chore: consistency/prettier

* chore: rebase

* chore: rebase

* chore: include typings

* fix: include typings file in prettier lint-staged
2020-02-29 14:35:57 +01:00
Ryan Munro
6650d50a56 feat(MessageEmbed): Support EmbedFieldData[] instead of EmbedFi… (#3845)
* fix(typings): MessageEmbedOptions#fields should be EmbedFieldData[]

* feat(MessageEmbed): Allow optional EmbedFieldData#inline in constructor

* docs(MessageEmbed): revert type change of fields

Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-29 14:21:43 +01:00
Papa
9c8aaf1bbc feat: reimplement disableEveryone into disableMentions
* User input sanitation: reimplement disableEveryone into disableMentions

* Change default value of ClientOptions#disableMentions to 'none'

* Update type declarations of disableMentions to include default

* update for compliance with ESLint

* Overlooked these files. Updated for complete compliance with ESLint
2020-02-29 14:20:39 +01:00
Bence
bbe169deac fix(MessageEmbed): prevent possible destructuring error 2020-02-29 14:19:56 +01:00
Sugden
e4f567c65e refactor(GuildChannel): change overwritePermisions to accept an… (#3853)
* refactor(GuildChannel): change overwritePermisions to no longer accept an object

* fix: check for instanceof Collection too
2020-02-29 14:19:21 +01:00
Sugden
f95df6f7d7 fix(Shard): cleanup after settling spawn promise (#3799)
* clear sharding ready timeout

* fix oops

* update typings

* commited to the wrong branch

* fix(Shard): cleanup after settling the spawn promise

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-29 14:18:57 +01:00
izexi
de4b4a0939 feat(GuildMemberStore): add options.withPresences to fetch() (#3562)
* feat: add options.withPresences to fetch()

feat: update presences if present on received data

typings: add user & withPresences to FetchMembersOptions

fix: checking for added options

ref: qol changes to return type

so that all members are fetched

oopsie

* fix: use Manager.cache

* fix(typings): tslint error

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-29 14:18:37 +01:00
Sugden
2ee0f1cdc6 feat(GuildManager): Allow for more options for GuildManager.cre… (#3742)
* typings: add GuildVerificationLevel and GuildExplicitContentFilter

* implement new types

* fix jsdoc on stores

* typo

* add more options for GuildStore#create

* add channels and roles

* update typings

* fix typings and use snake case for permissionOverwrites

* typings & jsdoc

* fix tslint

* remove trailing whitespace

* fix jsdoc

* fix jsdoc

* fix oopsies

* fix lint

* fix lint

* fix mr lint man

* add typedefs and support for setting channel parents

* fix tab indenation

* update jsdoc

* suggested changes

* style: fix silly format

* docs(PartialChannelData): name is not optional

* style: remove silly format
2020-02-29 07:43:42 +01:00
SpaceEEC
97457e1de2 feat(RichEmbed): add toJSON returning an api-compatible object
This backports:
PR: https://github.com/discordjs/discord.js/pull/3813
Commit: 4ec01ddef5
2020-02-28 18:29:41 +01:00
Sugden
3d0c1df19d refactor(Guild)/fix(Util): use resolveID and regex for cleanCod… (#3837)
* refactor(Guild): use resolveID instead of resolve(...).id

* fix(Util): use regex for cleanCodeBlockContent
2020-02-28 18:26:37 +01:00
Souji
6eaf63fb7c feat(RichEmbed): backport spliceFields and normalizeField (#3762)
* backport: RichEmbed#checkField, Util#resolveString

* backport: RichEmbed#spliceFields

* fix: typo

* chore: use util.resolveString everywhere

* chore: rename EmbedFIeld to EmbedFieldData

* consistency with v12

* chore: rename checkField to normalizeField

* consistency with v12

* fix: EmbedField instead of EmbedFieldData

* fix(typings): EmbedFIeld#inline is guaranteed

* fix(docs): add JSDocs typedef for EmbedFieldData

* fix(typings): EmbedFIeldData#name/#value

* should be StringResolvable

* refactor(RichEmbed): do not duplicate field prop checking

* docs(RichEmbed): document default for inline

* fix(RichEmbed): pass correct parameters to normalizeField

* typings(RichEmbed): add missing spaces

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-28 18:16:19 +01:00
Sugden
1af1e0cbb8 refactor: add some more consistency (#3842)
* cleanup(StreamDispatcher): remove old 'end' event

* fix(StreamDispatcher): only listen to finish event once

* refactor(VoiceWebSocket): use `connection.client` in favour of `connection.voiceManager.client`

* fix(VoiceWebSocket): use `client.clearInterval` in favour of `clearInterval`

* refactor: destructure EventEmitter

* refactor: destructure EventEmitter from events

* refactor: use EventEmitter.off in favour of EventEmitter.removeListener

* style: order typings alphabetically

* oops

* fix indent

* style: alphabetically organize imports

* style: remove extra line

* Revert "style: remove extra line"

This reverts commit 96e182ed69.

* Revert "style: alphabetically organize imports"

This reverts commit 02aee9b06d.

* Revert "refactor: destructure EventEmitter from events"

This reverts commit 9953b4d267.

* Revert "refactor: destructure EventEmitter"

This reverts commit 930d7751ab.

* Revert "fix(StreamDispatcher): only listen to finish event once"

This reverts commit 485a6430a8.

* refactor: use .removeListener instead of .off
2020-02-28 18:02:51 +01:00
Souji
df88729c44 feat(MessageEmbed): re-introduce MessageEmbed#addField (#3850)
* feat(MessageEmbed): re-introduce MessageEmbed#addField

* suggestion: sorting alphabetically

* suggestion: document inline to default false for #addField
2020-02-28 17:58:52 +01:00
Crawl
261816dcf8 chore(githooks): commitlint (#3836) 2020-02-28 17:43:45 +01:00
Sugden
31a3a86ebc docs(MessageEmbed): document article embed type (#3846) 2020-02-28 17:43:11 +01:00
Sugden
6109669c97 typings(WebhookClient): client is not a client (#3838) 2020-02-28 17:41:12 +01:00
Amish Shah
653784b564 chore(StreamDispatcher): remove end event
use finish event instead
2020-02-26 20:00:48 +00:00
Timo
9cb306c823 feat: replace disableEveryone with disableMentions (#3830)
* add ClientOptions#disableMentions and MessageOptions#disableMentions

* provide tests

* don't sanitize controlled mentions

* add @here mentions to tests

* fix indents (6 spaces instead of 8)

* add Util#cleanContent tests

* add typings for removeMentions

* replace @ with @\u200b AFTER cleaning content as suggested instead of using removeMentions

* better explanation of this option

* no newline in Util.removeMentions

* fix long line

* remove double space

* remove comments (change has been reverted)

* Use Util.removeMentions to remove mentions

* use Util.removeMentions in Util.cleanContent
2020-02-26 11:13:23 +00:00
Ryan Munro
cf646b5394 fix(typings): MessageOptions#split (#3834) 2020-02-26 09:46:19 +01:00
Crawl
c4bda746c8 chore(githooks): husky (#3835) 2020-02-24 23:32:12 +01:00
Crawl
3a0470b45c chore(deps): update deps and fix lint (#3833) 2020-02-24 23:14:31 +01:00
Crawl
c1d396a6c4 Partial-revert "typings(WebhookClient): client is not a Client" (#3831)
* Revert "typings(WebhookClient): client is not a Client (#3829)"

This reverts commit 44ff67dc11.

* Update index.d.ts

* Update index.d.ts
2020-02-24 22:44:46 +01:00
Sugden
44ff67dc11 typings(WebhookClient): client is not a Client (#3829)
* typings(WebhookClient): client is not a Client

* style: use tabs
2020-02-24 22:01:41 +01:00
Sugden
91a025caaa feat: GuildEmoji & Invite to GuildResolvable (#3637)
* Add GuildEmoji to GuildResolvable

* Add GuildEmoji to GuildResolvable

* Add Invite to GuildResolvable

* Add Invite to GuildResolvable

* oops

* oops x2

* Add Guild#fetchBan and an error for not resolving the ID

* typings

* Revert "Add Guild#fetchBan and an error for not resolving the ID"

This reverts commit a4d0ed16e7.

* Revert "typings"

This reverts commit 5a54e88785.

* fix jsdoc

* add trailing comma
2020-02-24 18:27:34 +01:00
Sugden
02807347e7 fix: Client#sweepMessages should throw an INVALID_TYPE error (#3828)
* fix(Client): sweepMessages shouldn't shrow an invalid client option error

* style: trailing commas
2020-02-24 18:27:15 +01:00
BorgerKing
52c0a4067b fix(MessageEmbed): various typos and fixes (#3819)
* fix: typo

* fix: couple more typos

* fix: grammar stuff

* fix: EmbedField takes StringResolvable not string

* Revert "fix: EmbedField takes StringResolvable not string"

This reverts commit c1bdd78ad3.

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-24 18:21:29 +01:00
matthewfripp
acf724e691 feat(Collector): Addition of resetTimer() (#3825)
* feat(Collector): Addition of resetTimer()

* typings
2020-02-24 18:17:24 +01:00
SpaceEEC
a69ebbe9d9 feat/fix(GuildAuditLogs): handle new event types (#3602)
* feat/fix(GuildAuditLogs): handle new event types

* fix(GuildAuditLogsEntry): coerce to numbers, simplify extra for deleted entities

* fix(GuildAuditLogsEntry): do not revert 'type' extra
2020-02-24 18:16:20 +01:00
Sugden
0a1b9a5285 refactor: remove unused error in catch statements (#3820)
* refactor(handlers): remove unused error in catch

* refactor(PacketHandler): remove unused error

* refactor(SecretBox): remove unused error

* refactor(ClientPresence): remove unused error

* style: remove space

Co-Authored-By: Crawl <icrawltogo@gmail.com>

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-24 18:15:38 +01:00
Crawl
98a552107e tooling(typings): new linter for typings (#3827) 2020-02-24 17:56:44 +01:00
Crawl
e6d22527bb chore(typings): semicolon consistency (#3826) 2020-02-24 17:22:16 +01:00
Souji
54f24d1fea typings(MessageEmebd): fix typings for addFields (#3821)
* typings(MessageEmebd): fix typings for addFields

* fix: add missing semicolon

* docs(MessageEmbed): fix various types

* in accordance with the scope of the PR

* Update src/structures/MessageEmbed.js

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 14:02:06 +01:00
Sugden
967b533e9d typings(MessageEmbed): properly mark properties (#3822)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 13:06:22 +01:00
Sugden
25cd23e305 cleanup(DMChannel): remove _cacheMessage (#3824)
* cleanup(DMChannel): remove _cacheMessage

* update actions/checkout to v2

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 13:06:00 +01:00
SpaceEEC
d406f42ce0 docs/typings(SystemChannelFlags): properly document and use resolvable (#3794)
- Change GuildEditData#systemChannelFlags to use SystemChannelFlagsResolvable
- Move SystemChannelFlagsResolvable outside of class definition to make the docs generator happy
2020-02-24 13:03:45 +01:00
SpaceEEC
ccb83a71ee docs/typings(MessageAttachment): mark spoiler as readonly, order spoiler in typings (#3714) 2020-02-24 13:03:02 +01:00
Tenpi
e57ef25082 typings/fix(MessageEmbed): add interfaces for props, fix copy constructor (#3492)
* updated typings

* Updated docs

* fixed types for MessageEmbedOptions

* added curly bracket spaces

* fix(MessageEmbed): make copy constructor work properly

* fix(MessageEmbed): copy the provider too

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 11:44:54 +01:00
Sugden
28490e84b0 typings(Invite): channel can be a PartialGroupDMChannel (#3823) 2020-02-24 10:41:29 +01:00
SpaceEEC
4ec01ddef5 feat(MessageEmbed): change toJSON method to return an api-compatible object (#3813) 2020-02-23 20:42:47 +01:00
Souji
b727f6c1b9 feat: bring embed builder field manipulation in line with underlying array functionality (#3761)
* feat: splice multiple fields

* remove MessageEmbed#spliceField
* add MessageEmbed#spliceFields
* to behave more like Array#splice
* and allow multiple fields to be replaced/inserted
* update typings accordingly

* refactor: rename check to normalize

* check suggests boolean return type

* feat: allow spread args or array as field input

* rewrite: replace addField in favor of addFields

* typings: account for changes

* chore: bump min node to 11.0.0

* for Array#flat

* fix: bump min-node in package engines field

* remove addBlankField
2020-02-23 20:41:48 +01:00
Sugden
ecd8cccddf typings(AddGuildMemberOptions): change accessToken from String to string (#3815) 2020-02-23 09:16:20 +01:00
iBisho
b347e9ec26 refactor(MessageEmbed): simplify initialization of files property (#3814) 2020-02-22 22:36:29 +01:00
Sugden
161f90761a feat(PartialGroupDMChannel): to support Invite#channel for group dms (#3786)
* add PartialGroupDMChannel class

* fix lint

* add new errors

* add new class to Channel.create

* fix lint

* update typings accordingly

* better implement errors

* remove unnecessary functions

* oops

* lint

* lint

* lint

* more lint

* more lint

* jsdoc typo

* suggested changes

* i did not forget the typings
2020-02-22 13:25:27 +01:00
Sugden
b0aed050e3 feat(Guild): add rulesChannel and publicUpdatesChannel (#3810)
* add rulesChannel* & publicUpdatesChannel*

* update typings
2020-02-22 13:14:11 +01:00
Sugden
bea6da621d feat(Guild): add rulesChannel and publicUpdatesChannel (#3810)
* add rulesChannel* & publicUpdatesChannel*

* update typings
2020-02-22 13:04:41 +01:00
Sugden
b0d0b81c61 feat: add new MessageTypes (14 and 15) (#3812)
* document types

* typings

* move comment
2020-02-22 12:52:31 +01:00
SpaceEEC
7e9c995566 feat(Message*): add missing fields, add support for flag editing (#3795) 2020-02-22 12:38:43 +01:00
SpaceEEC
330c410796 feat(Guild): add support for system channel flags (#3793) 2020-02-22 12:36:59 +01:00
SpaceEEC
ab866d6b2e feat(GuildChannel): add support for clone options, deprecate old signature (#3792) 2020-02-22 12:35:22 +01:00
Sugden
ef8acecc70 feat: add new MessageTypes (14 and 15) (#3812)
* document types

* typings

* move comment
2020-02-22 12:31:51 +01:00
Souji
f6075a6e3a typings(Constants): add VerificationLevels (#3811) 2020-02-21 21:48:08 +01:00
Sugden
f85230812f typings(Guild): mark afkChannel* & applicationID as nullable (#3805) 2020-02-19 21:34:26 +01:00
Sugden
c4c6ad4a63 docs/typings(WSEvents): add missing, remove duplicated and userbot events (#3800)
- Added `MESSAGE_REACTION_REMOVE_ALL`
- Remove duplicated `VOICE_STATE_UPDATE`
- Remove userbot `USER_SETTINGS_UPDATE`
2020-02-17 14:15:59 +01:00
Vlad Frangu
e4e977f447 src: update client options and shards value if fetching shard count (#3787)
* src: Update client options and shards value if fetching shard count

* src: Fix bug and remove more dead code
2020-02-16 19:41:37 +01:00
Vlad Frangu
46ee06b424 feat(Message): add support for flag editing / embed suppression (#3674) 2020-02-16 19:36:10 +01:00
Sugden
bc5e2950d0 fix(ReactionManager): update message if partial (#3789)
* update message after fetching if it is partial

* suggested changes

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-16 19:24:12 +01:00
SpaceEEC
544b14a5ed docs(PermissionResolvable): move definition outside of class
Otherwise it won't appear in the docs for some reason
2020-02-16 13:05:47 +01:00
Vlad Frangu
21d37ed0cc docs: clarify what zlib-sync does (#3785)
* docs: Clarify what zlib-sync does

* docs: Update docs site welcome

* src/docs: Remove `ws.compress` from docs

This is a deprecated parameter and you shouldn't use it unless you have zlib-sync installed, and even then, compression is automatically enabled

* docs: Apply suggestion

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-02-13 22:48:36 +01:00
Sugden
6770c7c786 typings: add invite events to WSEventType and constants (#3782)
* fix event typings

* add ws events to jsdoc
2020-02-13 22:46:46 +01:00
Ryan Munro
a36f3869b3 fix(Message): handle undefined/null content in cleanContent getter (#3778)
* Handle undefined/null content in Message#cleanContent

* Typings

* Update typings/index.d.ts

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-12 23:07:34 +01:00
Sugden
878cc050d4 fix(Guild): use snake case when editing system_channel_flags (#3781) 2020-02-12 22:47:24 +01:00
Sugden
562b5bfca7 refactor(VoiceChannel): use Permissions.FLAGS in speakable (#3780) 2020-02-12 22:42:43 +01:00
Sugden
d43692b0f2 docs(Guild): channels is a manager of channels (#3779) 2020-02-12 22:29:16 +01:00
Ryan Munro
62b227c2bd fix(BaseManager): BaseManager#valueOf should return cache (#3776)
* BaseManager#valueOf should return cache

* Update Util#flatten to handle valueOf being a Collection

* Update Util.js - typo

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
2020-02-12 22:26:17 +01:00
Ryan Munro
592021df92 feat(Message): throw a TypeError if delete is passed a non-object (#3772) 2020-02-12 22:25:14 +01:00
SpaceEEC
46e8bc44fc feat(BitField): add BitField base class (#3759)
* feat(BitField): add BitField base class

* fix(Permissions): properly deprecate the getters/setters
2020-02-12 22:23:48 +01:00
BorgerKing
b7ccf9a53e docs: info tag for ActivityType regarding CUSTOM_STATUS (#3758) 2020-02-12 22:23:35 +01:00
BorgerKing
3f8ea38b3a docs: info tag for ActivityType regarding CUSTOM_STATUS (#3757) 2020-02-12 22:23:06 +01:00
Ryan Munro
dbdb49ee1c feat(GuildAuditLogs): handle new event types (#3760)
* Define new AuditLogActions

* Backport constructor rewrite

* Typings

* fix(GuildAuditLogEntry): switch on correct property, coerce to numbers, simplify extra for deleted entities

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-12 18:42:57 +01:00
Sugden
149f72b50b typings(GuildMemberManager): fetch with no parameters returns collection (#3773) 2020-02-12 18:40:20 +01:00
Androz
94bb268639 docs: add extends to ChannelManager, cache is not nullable, resolveID accepts an object (#3771)
* Add extends to docs

* Cache shouldn't be nullable

* jsdoc: use same type for both resolve methods
2020-02-12 18:36:08 +01:00
SpaceEEC
92bc634520 docs(*Manager): fix child classes' cache type annotations (#3777) 2020-02-12 18:28:25 +01:00
Sugden
324d9e0a3a fix(TextChannel): remove old nsfw regex check (#3775) 2020-02-12 18:24:35 +01:00
BorgerKing
bbdbc4cfa7 feat: remove datastores and implement Managers (#3696)
* Initial commit: add 5 initial managers

- Base manager
- GuildChannelManager
- MessageManager
- PresenceManager
- Reaction Manager
- Added LimitedCollection

* Add GuildEmojiManager, various fixes

* Modify some managers and add guildmembermanager

* Initial integration

* Delete old stores

* Integration part two, removed LRUCollection

- Most of the integration has been finished
- TODO typings
- Removed LRUCollection, needless sweeping

* Typings + stuff i somehow missed in ChannelManager

* LimitedCollection typings/ final changes

* Various jsdoc and syntactical fixes, Removed Util.mixin()

* tslint fix

* Grammatical and logical changes

* Delete temporary file placed by mistake

* Grammatical changes

* Add missing type

* Update jsdoc examples

* fix: ChannelManager#remove should call cache#delete not cache#remove

* fix recursive require

* Fix missed cache in util

* fix: more missed cache

* Remove accidental _fetchMany change from #3645

* fix: use .cache.delete() over .remove()

* fix: missing cache in ReactionCollector

* fix: missed cache in client

* fix: members is a collection not a manager

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix: various docs and cache fixes

* fix: missed cache

* fix: missing _roles

* Final testing and debugging

* LimitedCollection: return the Collection instead of undefined on .set

* Add cache to BaseManager in typings

* Commit fixes i forgot to stage yesterday

* Update invite events

* Account for new commit

* fix: MessageReactionRemoveAll should call .cache.clear()

* fix: add .cache at various places, correct return type

* docs: remove mentions of 'store'

* Add extra documented properties to typings

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-11 20:21:07 +01:00
SpaceEEC
83bc6e0779 fix(Guild): update premiumSinceTimestamp on guild member update 2020-02-07 19:13:02 +01:00
didinele
fe7df708e4 typings: add HTTPOptions#api and export Constants as a value (#3768)
* fix(typings): Export Constants correctly

* fix(typings): HTTPOptions#api was missing

* fix some odd indent

* add semi to make CI happy uwu
2020-02-07 18:46:03 +01:00
Souji
364914fd35 fix(GuildMember): manageable - let owner override (#3766)
This backports #3765
2020-02-07 18:27:56 +01:00
Souji
3f039016af fix(GuildMember): manageable - let owner override (#3765)
* if the bot is owner of the guild the target is managebale
* even though both roles are on the same position
2020-02-07 18:27:05 +01:00
Vlad Frangu
b4e56d3e0e src: fix up WebSocketShard errors (#3722)
* src: Fix up WebSocketShard errors

* typings: Forgot to update

* src: Forgot debug variable

* src: Fix issue Bella found
If the WS was not connected when the HELLO timeout passes
(CONNECTING, etc), the shard would get stuck
due to never rejecting the WebSocketShard#connect
Promise with the DESTROYED event
2020-02-02 11:12:58 +01:00
SpaceEEC
c955fd00c7 feat(Integration): add guild integrations (#3756) 2020-02-02 11:11:31 +01:00
SpaceEEC
a12e1e87ee typings(Constants): add CUSTOM_STATUS to ActivityTypes 2020-02-01 21:14:02 +01:00
SpaceEEC
2589db6633 feat(Constants): add CUSTOM_STATUS to ActivityTypes 2020-02-01 21:12:58 +01:00
SpaceEEC
17b8b23b80 feat(Presence/Game): multiple activities and custom status (#3747)
* feat(Presence): add activities

* feat(Game): add created* and emoji
2020-02-01 18:27:20 +01:00
SpaceEEC
ccd60438df feat(Collector): add idle option (#3746) 2020-02-01 18:23:56 +01:00
SpaceEEC
fbcd363ec9 fix(Voice*): fix speaking event and voice receive (#3749)
* fix(Voice*): synthesize speaking event from UDP packets

* fix(VoiceReceiver): skip over undocumented Discord byte

See #3555

* fix(VoiceConnection): play frame silence before emitting ready

* typings: account for changes in private api
2020-01-31 22:37:11 +01:00
SpaceEEC
6d7e1e4953 fix: remove for..in in favor of Object.keys (#3745) 2020-01-31 11:38:47 +00:00
PLASMAchicken
6a381c68a2 chore(README): update link to Discord.js guide v12 changes (#3751)
* Update link to discord.js guide v12 changes

* Suggested Changes

* Suggested Changes

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
2020-01-31 11:38:10 +00:00
Jyguy
8e9e93da1d docs(Guild): fetchBan returns a promise (#3752) 2020-01-29 18:54:10 +01:00
BorgerKing
030d263a9e feat(MessageReaction): add remove method and Client#messageReactionRemoveEmoji (#3723)
* Add support for MessageReaction#remove and MESSAGE_REACTION_REMOVE_EMOJI

* Remove reaction from cache

Co-Authored-By: matthewfripp <50251454+matthewfripp@users.noreply.github.com>

* fix: message may be partial

* Clarify what the event entails

* Document client in MessageReaction

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* await the REST call

* Add MessageReaction#remove to typings

Co-authored-by: matthewfripp <50251454+matthewfripp@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-01-25 20:00:53 +01:00
Ryan Munro
ab7f9e80b4 feat(MessageReaction): backport removeAll and MessageReactionRemoveEmoji event (#3741)
* Add new action and websocket handler

* Add REST method for removing reaction emoji

* Update Message#_removeReaction to handle removing whole emoji

* Add MessageReaction#removeAll and update typings

* Apply uncached user fix
2020-01-25 15:36:35 +01:00
Ryan Munro
d8b4725caa fix(TextChannel#bulkDelete): use GenericAction#getMessage to handle return value correctly (#3664)
* Corrected the handling of the action

* Apply same fix to handling of single message in bulkDelete

* Revert to using await
2020-01-25 15:27:39 +01:00
PLASMAchicken
6b297b8776 chore: bump version to 11.6.0-dev (#3731)
* Update package.json

* Change Version String after amishshah's  suggestion

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
2020-01-25 15:09:30 +01:00
Sugden
3ea9ac57dd fix(ClientUser): verified and enabled properties resetting (#3733)
* fix(ClientUser) verified and enabled properties resetting

* set this.mfaEnabled to null if it is undefined

* add missing curly brackets

* fix typo
2020-01-25 15:08:25 +01:00
BorgerKing
90aa5b3500 feat(GuildMemberStore): make timeout refresh after every GUILD_MEMBERS_CHUNK (#3645) 2020-01-24 17:08:40 +01:00
Gryffon Bellish
b81f771007 cleanup: fix deepscan issues (#3740)
* fix: don't double check if shards are auto.

* fix: remove useless roles array.

* fix: remove useless undefined checks.

* fix: remove useless `this` binding

* Apply suggestions from code review

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* Fix: Space's suggestion

* Fix: time is always truthy

* Check if it's an invalid date.

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-01-24 16:58:23 +01:00
SpaceEEC
099a1a47e8 fix(*Collector): always run postCheck, remove 'translatation' of message collector options (#3718)
* fix(*Collector): always run postCheck, correctly 'translate' message collector options

* fix(MessageCollector): remove translation, fix postCheck conditions
2020-01-24 16:56:04 +01:00
SpaceEEC
30adb378fc feat(Webhook): backport missing properties (#3710)
* feat(Webhook): add avatarURL getter

This backports: https://github.com/discordjs/discord.js/pull/3625

* feat(Webhook): add type, createAt, and createdTimestamp

This backports: https://github.com/discordjs/discord.js/pull/3585

* feat(Webhook): add url getter

This backports: https://github.com/discordjs/discord.js/pull/3178

* docs(Webhook): add missing type and readonly tags
2020-01-24 16:52:52 +01:00
SpaceEEC
88b675d38a feat(MessageReaction): backport animated, client, created*, and url (#3711) 2020-01-24 16:50:16 +01:00
SpaceEEC
4ca18647ba feat(MessageAttachment): add spoiler getter (#3713) 2020-01-24 16:45:52 +01:00
SpaceEEC
a505a55e03 fix(RichPresenceAssets): add Twitch preview link for largeImageURL (#3715) 2020-01-24 16:43:16 +01:00
SpaceEEC
903f6ca75f fix: only setMaxListeners when max listeners is not 0 (#3716) 2020-01-24 16:41:37 +01:00
BorgerKing
929ff9ccd0 feat(Client): add support for INVITE_CREATE and INVITE_DELETE events (#3720)
* Add support for new Invite events

* Merge typings for events

Co-Authored-By: Sugden <leoaustin675@gmail.com>

* Add warning about requiring permissions

* Null check channel and guild

* fix: .guilds not .channels
2020-01-24 16:38:26 +01:00
Ryan Munro
40afbc1d7e feat(Client): backport INVITE_CREATE and INVITE_DELETE events (#3728)
* Backport INVITE_CREATE and INVITE_DELETE

* Register events to Websocket

* Dont create an Invite if the guild is null

* Null check channel too
2020-01-24 16:34:59 +01:00
Ryan Munro
17237c70c8 typings(TextChannel): topic can be null (#3687)
* Mark topic as nullable for TextChannel

* Backport separate NewsChannel typings

* Ensure NewsChannel#rateLimitPerUser is undefined

* Revert rateLimitPerUser, considered breaking

* Add rateLimitPerUser back to typings

* Linting

* Revert NewsChannel extends TextBasedChannel
2020-01-24 16:33:19 +01:00
Sugden
c779fe3670 feat(Guild): add fetchBan method (#3726)
* Add error for not resolving ID to fetch ban

* Add Guild#fetchBan

* add missing !

* typings

* lint fixes

* add jsdoc description
2020-01-24 15:29:53 +01:00
Carter
63293fe14d chore(License): bump license year (#3734) 2020-01-22 08:21:43 +00:00
SpaceEEC
464ef25898 fix(ClientDataResolver): return a user in resolveUser when passing guild (#3719) 2020-01-20 22:02:28 +01:00
Sugden
877577badc typings(RichPresenceAssets): *ImageURL's options are optional (#3727) 2020-01-20 22:02:02 +01:00
Souji
d8419ac2c7 docs(MessageMentions): backport mention order notice (#3712) 2020-01-19 13:09:33 +01:00
SpaceEEC
c5d2b96524 fix(VoiceConnection): use Client#clearTimeout to clear timeouts (#3709) 2020-01-19 13:08:49 +01:00
SpaceEEC
01826aeefe feat(Guild): add setBanner method and banner to edit (#3708) 2020-01-19 13:07:09 +01:00
SpaceEEC
6302afb84b docs(MessageMentions): channels are actually in order (#3705)
* docs(MessageMentions): channels are actually in order

* docs(MessageMentions): readd info about order for channels

* docs(MessageMentions): reword info to account for rtl locales
2020-01-19 13:06:21 +01:00
SpaceEEC
f501d06c0d fix(Presence): account for multiple activities everywhere (#3703)
* fix(Presence): account for multiple activities everywhere

* refactor(Presence): make initialization of 'activities' more readable
2020-01-19 13:05:45 +01:00
Ryan Munro
0f49d67e2e feat(Message/Mentions): implement caching of members (#3684)
* Convert message#member to a getter

*  Try to cache members from data in message payloads

* Cache mentioned members

* Revert Message#member getter - breaking change

* Revise member caching

* Revise member mention caching

* Pass member to _addMember correctly

* Use message.guild instead of this.guild

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* Merge if's onto one line

* fix(Message): use this.author.id to check cache

Discord does not send an id in the member data here

* chore(Message): reindent equals

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-01-19 12:27:57 +01:00
BorgerKing
cbb8db3058 feat(Collectors): make collectors auto-stop when relevant structures are deleted (#3632)
* Collectors: make Collectors automatically stop when Channel, Guild, or Message are deleted.

* fix potential error with DM collectors

* Message collectors dont have a `this.message` you dummy

* Fix(various): nitpicks, documentation, typings, and stray error

* Pleasing mr tslint

* fix: typings

* Grammatical fixes

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* Fixing the linting after space's suggestions

* docs(ReactionCollector): remove whitespace

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-01-19 11:24:55 +01:00
Amish Shah
6ab46491c8 Add internal support for @discordjs/opus to v11 (#3700)
* Add internal support for @discordjs/opus

* Remove redundant try/catch

* fix: use setBitrate method in @discordjs/opus

* chore: tidy up opus imports

* fix: correct imports for DiscordJsOpusEngine

* chore: update docs to prefer @discordjs/opus

* chore: bump prism-media to 0.0.4 to allow ffmpeg-static
2020-01-17 20:58:49 +00:00
Gryffon Bellish
69c79a4136 typings/docs(GuildEmoji): id isn't nullable (#3694)
* Fix: GuildEmoji#id isn't nullable

* Move ID to be alphabetical

* Add JSDoc to say it's not nullable

* fix linting
2020-01-17 20:11:14 +01:00
Crawl
6a0fe467e5 docs: replace all occurances of node-opus with @discordjs/opus (#3698)
* docs: replace all occurances of node-opus with @discordjs/opus

* chore: leave in node-opus in case not everyone switched
2020-01-16 14:10:48 +01:00
Crawl
d096e40f6f feat/fix: use updated eslint action (#3699) 2020-01-16 12:59:03 +01:00
Helmasaur
d77229f423 chore: ffmpeg package in the voice doc (#3697)
ffmpeg package changed from "ffmpeg-binaries" to "ffmpeg-static"
2020-01-16 12:57:20 +01:00
Souji
7f99be739a docs(MessageMentions): add sort order notice (#3693)
* mention order returned from API
* not left to right in text
2020-01-14 11:28:19 +01:00
Gryffon Bellish
75fe1faf2f Remove BroadcastAudioPlayer from typings (#3692) 2020-01-13 22:45:58 +00:00
Amish Shah
629c57f890 fix: regression (changing voice servers) 2020-01-13 22:29:05 +00:00
SpaceEEC
36c0496ea5 fix(Guild): assign GuildMember#selfStream, if present, when adding a member 2020-01-13 21:43:42 +01:00
SpaceEEC
ee0b7c155a feat(Presence): add support for multiple activities (#3661)
* feat(Presence): add support for multiple activites

* typings(Presence): fix spelling of 'activities'

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
2020-01-13 20:28:29 +00:00
Ryan Munro
07996d12a2 feat(Constants): backport VerificationLevels and missing APIError codes (#3688)
* Add VerificationLevel constants

* Update APIError constants
2020-01-13 20:47:55 +01:00
Vlad Frangu
c23cc7a42e src: Cleanup event listeners on WebSocket connections (#3681)
* src: Cleanup event listeners on WebSocket connections
Should prevent #3641 from happening, as well as double connections on a shard

* typings: Forgot to add the method
2020-01-13 18:53:07 +00:00
Vlad Frangu
684bb1bf36 src: Remove _trace from different places in the WS (#3679)
* src: Remove `ws._trace` from READY

* src: Remove `ws._trace` from RESUME

* lint: Fix lint by removing unused packet (#7)

Co-authored-by: bdistin <bdistin@gmail.com>
2020-01-13 17:54:15 +00:00
Ayyan Lewis
45cd58b68c types(VoiceBroadcast): add subscribers property (#3677)
* types(VoiceBroadcast): add subscribers property

* types(VoiceBroadcast): change player property to private

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
2020-01-13 17:01:16 +00:00
Antonio Román
53a1f8fcd4 refactor: Remove util alias export (#3691) 2020-01-13 16:16:22 +00:00
Antonio Román
62afafdbe9 typings: Fixed build error (#3689) 2020-01-13 16:48:49 +01:00
Tenpi
8014ddcd1c feat: dynamic property for ImageURLOptions (#3530)
* Added dynamic property to ImageURLOptions

* fixes

* order

* typings fix

* made dynamic false by default

* add curly spaces
2020-01-13 14:32:29 +00:00
SpaceEEC
400cb56358 fix(ShardingManager): assert shardList to be spawned, not totalShards (#3649) 2020-01-13 14:12:18 +00:00
SpaceEEC
11f9118551 fix(BitField): remove for..in in favor of Object.entries (#3650)
* fix(BitField): remove for..in in favor of Object.keys

* refactor: do not re-resolve bits

Co-Authored-By: bdistin <bdistin@gmail.com>

Co-authored-by: bdistin <bdistin@gmail.com>
2020-01-13 14:07:54 +00:00
Souji
59205a2152 fix: provide count on bulk deletion (#3682)
* GuildAuditLogsEntry should provide count as extra in case of  MESSAGE_BULK_DELETE
* inner class: GuildAuditLogsEntry in GuildAuditLogs.js
2020-01-13 14:02:31 +00:00
Ryan Munro
f6d1db6a24 Backport documentation fixes (#3683)
* Presence does not extend Base, therefore presence.client was undocumented

* Document Client#fetchVoiceRegions returning a promise
2020-01-13 14:00:13 +00:00
SpaceEEC
b5825c33b0 feat(Speaking): add PRIORITY_SPEAKING bit (#3680) 2020-01-13 13:58:40 +00:00
Vlad Frangu
5556b05241 src: add deprecation warning related to removel of uws (#3648)
* src: Add deprecation warning related to uws

* lint: Fix lint

* src: Simplify code
2020-01-12 15:16:27 +01:00
didinele
f74ae12d6a fix(typings): remove VoiceChannel#connection (#3676) 2020-01-11 20:42:01 +01:00
Saya
a53d86579b typings(BaseClient): remove delay parameter from setImmediate (#3667)
There is no delay parameter on setImmediate in Node.JS docs:
https://nodejs.org/docs/latest-v12.x/api/timers.html#timers_setimmediate_callback_args
2020-01-09 23:14:55 +01:00
SpaceEEC
fbe9bc499b feat(Webhook): add ability to change channel and specify reason to edit (#3587)
* feat(Webhook): add ability to change channel and specify reason to edit

* fix(RESTMethods): update channelID of the webhook too
2020-01-05 18:34:00 +01:00
SpaceEEC
d1d0d75d4a fix(ChannelDelete): mark messages of a deleted channel as deleted (#3572) 2020-01-05 18:29:14 +01:00
SpaceEEC
367c80070f feat(Permissions): add any method (#3571)
* feat(Permissions): add any method

* typings: add Permissions#any

* fix(Permissions): resolve doesn't take a checkAdmin parameter

Co-Authored-By: bdistin <bdistin@gmail.com>

* docs(Permissions): remove trailing space, add returns annotation

Co-authored-by: bdistin <bdistin@gmail.com>
2020-01-05 18:24:08 +01:00
SpaceEEC
cbabc1663c fix(Voice*): internally disconnect and cleanup when forcibly disconnected (#3597) 2020-01-05 18:10:20 +01:00
Gryffon Bellish
d2ef02906c cleanup(DataResolver): stats can't be falsy (#3651) 2020-01-05 17:45:16 +01:00
izexi
6af0da1043 feat(Partials): add DMChannel/MessageReaction#fetch() and PartialTypes.REACTION (#3474)
* add DMChannel#fetch() & Action#getChannel({recipients})

* ref for MessageReaction partial

* typings

* add PartialTypes.REACTION

* accommodate for fully removed reactions

* fix incorrect wording and typo

* typings: MessageReaction#count is nullable

* typings: mark MessageReaction#partial as readonly

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* fix(User): fetch dm channel if cached one is partial

* docs: add missing comma

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>

* fix: accomodate for new reactions

* fix: updating existing/new count on _patch

* docs: typo

* for consistency

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2020-01-05 16:45:49 +01:00
tipakA
bf31b28ad9 feat(RichPresenceAssets): add Twitch preview link for largeImageURL (#3655) 2020-01-05 00:50:38 +01:00
Jyguy
155b682f6c typings(GuildEmoji): make url not-nullable (#3656)
* typings(GuildEmoji): make url not-nullable

* make GuildEmoji.url readonly
2020-01-04 23:23:01 +01:00
Cadence Fish
c734979ad4 typings(ShardingManager): add options.shardList (#3657) 2020-01-03 13:53:27 +01:00
SpaceEEC
97eac663b3 feat(MessageMentions): cache mentioned members (#3601) 2019-12-27 19:28:04 +01:00
SpaceEEC
e660ea90cc fix(Webhook): edit channel when editing avatar (#3588) 2019-12-27 19:27:48 +01:00
SpaceEEC
ea76a56639 feat(Webhook): add type property and created* getters (#3585)
* feat(Webhook): add created* getters

* feat(Webhook): add type property

* typings(WebhookFields): use primitive string for url getter

Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>

* fix(Webhook): token can be null

Co-authored-by: Gryffon Bellish <owenbellish@gmail.com>
2019-12-27 19:27:34 +01:00
SpaceEEC
fc27ce1a15 typings(Bitfield): add hasParams to toArray, fix serialize's type (#3579)
* typings(Bitfield): add hasParams to toArray, fix serialize's type

* fix: apply suggested changes

* chore: remove incorrect whitespace

* fix: make params optional

* nit: pluralize bit in Permissions#missing

* nit: group non-static methods together
2019-12-27 19:26:41 +01:00
NightScript
50ed3293a5 chore: issue config refactor (#3640)
* Create config.yml

Instead of making an entire new page with just text talking about the discord server (which they could ignore, as most people don't read), just link people directly to the discord server

* Delete question---general-support-request.md
2019-12-25 03:29:19 +01:00
Gryffon Bellish
d4333f5bbe chore: node version in package.json (#3643) 2019-12-25 03:28:09 +01:00
Gryffon Bellish
45b8971000 deps: mark utf-8-validate as optional, remove mentions of uws and zucc (#3638)
* Mark utf-8-validate as optional

* remove uws and zucc
2019-12-23 23:01:07 +01:00
Vlad Frangu
710101c580 src(WebSocket): fix race condition (#3636)
A race condition caused Client#user to be null in the ready event if the client handled 0 guilds.
2019-12-22 10:31:26 +01:00
Antonio Román
b4f00bfb6b feat: widen GuildResolvable to include more structures (#3512)
* feat: Widen GuildResolvable to include GuildChannel and GuildMember

* docs: Documented the new overloads

Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>

Co-authored-by: Gryffon Bellish <owenbellish@gmail.com>
2019-12-21 21:28:09 +01:00
ottomated
f578cce9ac feat(Guild): add systemChannelFlags (#3559)
* Add systemChannelFlags bitfield to Guild

* Implement @vladfrangu's suggestions

* fix: apply suggestions, reverse order of flags, reword docs

* docs: add SystemCHannelFlagsResolvable typedef

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2019-12-21 21:27:14 +01:00
Charlie
e13b3f550d typings: TextChannel.topic & NewsChannel.topic should be nullable (#3628)
* Fix GuildChannel#topic to be optional

* Update typings/index.d.ts

Implement the suggested change from optional to null return

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* Update typings/index.d.ts

Implement the suggested change from optional to null return

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
2019-12-21 21:12:35 +01:00
Sugden
99e8d3c540 cleanup: remove acknowledge method from TextChannel & DMChannel (#3635)
* Update TextChannel.js

* remove acknowledge method
2019-12-21 20:32:24 +01:00
SpaceEEC
7d74e7e419 typings(Extendable): add missing channels (#3581) 2019-12-20 11:58:46 +01:00
Vlad Frangu
5519d6fbaa src: sharding cleanup and checkReady rewrite (#3393)
* src: Step 1 of who knows how many

* src: Remove accidentally committed test file

* src: Remove useless added property in package.json

* docs: Trailing spaces, come back >.>

* src: Buhbye uws, we will miss you..not!

* src: Move 'auto' shard selection from totalShardCount to shards

* src: tweak

* src: Filter out floats from shard IDs
You want half of a shard or what?

* src: Misc cleanup and bugfix for GUILD_BAN_ADD

* src: Rewrite checkReady

* src: Misse this while merging master into my branch

* typings: Bring these up to date

* typings: Forgot allReady event

* src: Don't checkReady if the shard isn't waiting for guilds

* src: Fix a possible bug for when the ws dies and the session becomes -1

* src: Hopefully fix last edge case that could case a shard to infinitely boot loop

* src: Rename totalShardCount to shardCount

* src: Small bugfix

* src: Correct error message for shardCount being imvalid

Co-Authored-By: bdistin <bdistin@gmail.com>

* src: Small tweaks

* src: If this doesn't fix the issues I'm gonna throw a brick at my PC

* src: I swear, STOP BREAKING

* src: *groans at a certain snake*

* src: Use undefined instead of null on destroy in close event

Setting it to null sets the close code to null, which causes a WebSocket error to be thrown. The error is thrown from WebSocket, although there is no connection alive. Fun times!

* src: @SpaceEEC's requested changes

* src: Remove zucc from discord.js

Discord is removing support for it, sooo... Bye bye

* src: Missed this

* src: Apply @kyranet's suggestions

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>

* src: @kyranet's suggestions

* src: Remove pako, update debug messages
- Pako is officially gone from both enviroments
  Install zlib-sync on node.js if you want it
- Improve a few debug messages some more
- Discover that internal sharding works in browsers but please don't do that
2019-12-15 20:45:27 +01:00
Gryffon Bellish
f56b442e83 typings(Bitfield): use IterableIterator instead of Iterator (#3599) 2019-12-15 20:26:09 +01:00
izexi
43782839ec feat: add new MessageFlags.FLAGS & User#system (#3603)
* feat: add new FLAGS

* feat: add system property

* typings: add User#system & new MessageFlagsStrings
2019-12-15 20:23:06 +01:00
Carter
330d5db586 feat(Webhook): addition of Webhook#avatarURL function (#3625)
* feat: addition of Webhook#avatarURL

* typings: added Webhook#avatarURL

* fix: trailing space

* docs: fixed jsdoc function description

* fix: typo
2019-12-15 20:20:15 +01:00
BorgerKing
123713305a docs(ReactionStore): resolveID takes a reaction, not role (#3617)
* Docs: ReactionStore.resolveID should take Reaction, not role

* Make param lowercase

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>
2019-12-08 19:52:03 +01:00
sillyfrog
4585d965b4 Start/Stop speaking events on UDP packets (#3578)
* Start/Stop speaking using incomming UDP packets

* Fix ESLint errors

* Updates for styling consistency

Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>

* Minor improvements

* Acutally use previousTimeout

* Use BaseClient setTimeout and refresh()

* Update README to match node version for refresh()

* Update comment to match startSpeaking

* Correctly report Priority bit

* Fix ESlint errors
2019-12-06 11:59:57 +00:00
Clemens E
bb8333a4f9 Handle voice errors outside of authenticated event (#3520) 2019-12-06 11:56:29 +00:00
Jeroen Claassens
2ca74d6b63 feat(Activity): support for CUSTOM_STATUS activity type (#3353)
* feat: support for custom status in activity

* nit(typings): order properties
2019-12-05 13:13:42 +01:00
BannerBomb
1b1289b35e misc(index): export Store- and NewsChannel (#3594)
* Added Store and NewsChannel to exports

Added the StoreChannel and NewsChannel structures to the module exports.

* keeping the list in alphabetical order

I moved the StoreChannel and NewsChannel exports that I added in the last commit in their right position to keep things alphabetized.
2019-11-25 16:17:30 +01:00
Gryffon Bellish
100360705a fix(APIRouter): use proper symbol for util.inspect (#3589) 2019-11-20 18:11:23 +01:00
Jyguy
cbde819b6a typings(GuildAuditLogsFetchOptions): specify concrete type of 'type' property (#3586) 2019-11-20 00:21:47 +01:00
Gryffon Bellish
d39f17925d fix(Invite): fix valueOf returning undefined (#3582)
* Update Invite.js

* Fix typings

* Fix ESLint errors
2019-11-19 21:54:35 +01:00
Carter
1bcc0c2e1d feat(GuildAuditLogs): add new event types (#3584)
* adds more audit-log entries

this adds additional audit-log types from https://discordapp/discord-api-docs/pull/1191

* typings for new audit-log entries

* typings for new audit-log entries

* fix action numbers
2019-11-19 21:51:26 +01:00
λtlas
1d6606293a docs(Client): clarify whose ToS are being violated (#3580) 2019-11-19 21:50:45 +01:00
Edward Wang
1352bff2fd docs(README): link to guide page instead of source (#3566)
* Fixed the Update Guide Link

Original link pointed to https://github.com/discordjs/guide/blob/v12-changes/guide/additional-info/changes-in-v12.md, which is invalid. I'm not sure if the link I put (https://github.com/discordjs/guide/blob/master/guide/additional-info/changes-in-v12.md) is the correct one, but I will assume it is.

* Used link to the DJS guide.
2019-11-09 20:52:55 +01:00
Carter
9a31e6e53a docs(README): travis badge => github actions badge (#3569)
* travis badge => github actions badge

* this is why you don't copy paste :^)
2019-11-09 20:52:06 +01:00
matthewfripp
38d370fb18 feat(MessageAttachment): add spoiler property (#3561)
* feat(MessageAttachment): add spoiler property

* typings

* Implement suggestions

* Make readonly

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
2019-11-04 14:44:36 +01:00
Jiralite
cc466fa4b9 docs: NewsChannel and StoreChannel (#3557)
* Added news & store

* Update GuildChannel.js

* Added in News and Store
2019-11-04 11:35:14 +01:00
Purpzie
99466a99ed typings(Util): use StringResolvable (fixes old pull) (#3556)
Fixes my extremely old pull #3212 that didn't actually update the typing (Didn't know at the time.)
2019-11-04 11:33:42 +01:00
Albus Dumbledore
e26697f07d docs(readme): table of contents (#3539) 2019-11-04 11:29:19 +01:00
SpaceEEC
2e20e8092b fix(*Collector): account for a max listener count of 0 (#3504) 2019-11-04 11:25:43 +01:00
Jeroen Claassens
3c634b2a26 chore: mark optional peerDependencies as optional (#3511) 2019-11-04 11:25:14 +01:00
Marwin M
3a9eb5b929 Fix Opus voice streams (#3555)
This fixes a wrong assumption about incoming discord voice packets revealed during a recent discord change that broke incoming opus voice streams
2019-10-29 12:22:21 +00:00
Gryffon Bellish
9bcb6a04ba fix(VoiceConnection): clear timeouts using Client#clearTimeout (#3553)
* Update VoiceConnection.js

* fix last instance
2019-10-27 16:58:38 +01:00
SpaceEEC
96037e107f feat(GuildMember): add selfStream (#3522) 2019-10-27 10:27:43 +01:00
SpaceEEC
f91ad7023b feat(GuildMember): filter out duplicate roles when updating (#3502) 2019-10-27 10:27:01 +01:00
SpaceEEC
18613526bd docs(VoiceStatus): document name -> value, link in VoiceConnection#status (#3500) 2019-10-27 10:26:08 +01:00
SpaceEEC
91600a6946 fix(VoiceReceiver): delete opus encoder from map in stoppedSpeaking (#3499) 2019-10-27 10:24:35 +01:00
Souji
7011c512fb fix: document ChannelData#reason (#3549)
* fix: document ChannelData#reason

* update respective typings
* closes #3548

* update: add note creation only

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>
2019-10-22 21:17:56 +02:00
Alexander Kashev
16db92ede8 typings(GuildEmoji): restore deletable, remove inherited property deleted (#3543)
* Typings: restore deletable on GuildEmoji

* Remove inherited property "deleted"
2019-10-18 13:06:34 +02:00
rei2hu
9e0705cbc3 fix(Message): check for edited_timestamp in data when patching message (#3535)
* check for data.edited_timestamp

* actually i should do it like this for consistency

* indentation
2019-10-18 11:55:35 +02:00
Antonio Román
a61cfc3004 docs: VoiceStateUpdate always sends an instance of VoiceState (#3537)
* docs: VoiceStateUpdate always sends the old

* typings: Update definition for voiceStateUpdate event
2019-10-18 11:32:19 +02:00
Alexander Kashev
ca1bd61f4f typings(Emoji): remove deletable, add deleted, mark nullable props (#3542) 2019-10-18 11:30:49 +02:00
bdistin
c3228b4263 fix(docslink): partialtypes (#3510) 2019-10-12 00:54:02 +02:00
Tenpi
79133b4d5e at(typings): partial Types (#3493)
* test

* test 2

* update

* update

* replaced double quotes

* Made message.guild and message.member nullable

* replaced double quotes again (oops)

* missing semicolons

* removed fetch from Omit

* Added Partialize generic type

* Created interfaces (prettier intellisense)

* joinedAt/joinedTimestamp are nullable and fixed conflict
2019-10-12 00:52:00 +02:00
Antonio Román
a60f8b3d49 src(constants): add missing APIErrors (#3531)
* src: Updated APIErrors

* typings: Updated constants
2019-10-11 11:01:16 +02:00
izexi
a8f06f251f feat(VoiceState): add VoiceState#streaming (#3521)
* feat: add VoiceState#streaming

* typings: add VoiceState#streaming
2019-10-04 16:44:35 +02:00
Souji
48856c0815 fix: set messages deleted when their channel is deleted (#3519) 2019-10-04 16:44:04 +02:00
Souji
2610bf57ae feat(GuildChannel): backport permissionsLocked getter (#3507)
* backport(GuildChannel): GuildChannel#permissionsLocked

* typings: GuildChannel#permissionsLocked

* fix(typings): mark permissionsLocked getter as readonly
2019-10-04 16:43:12 +02:00
rei2hu
8ddd0616a9 fix(Util): make arraysEqual avoid mutating the input arrays (#3506) 2019-10-04 16:39:56 +02:00
SpaceEEC
a8e365743c typings: optional reason for setNSFW and add deleted properties (#3505)
* typings: optional reason for setNSFW and add deleted properties

* typings(Guild): setDefaultMessageNotifications' reason is also optional
2019-10-04 11:20:56 +02:00
izexi
94ce19dd1a typings: mark GuildMember#nickname as nullable (#3517) 2019-10-04 11:19:55 +02:00
izexi
3458693748 typings: mark GuildMember#nickname as nullable (#3516) 2019-10-04 11:19:46 +02:00
Souji
2a78b00454 fix(typings): GuildChannel#parent and #parentID are nullable (#3509) 2019-10-02 14:26:53 +02:00
Souji
e936f071c0 fix(typings): GuildChannel#parentID is nullable (#3508) 2019-10-02 14:26:42 +02:00
Vlad Frangu
a4f06bdffd src: support new message fields (#3388)
* src: Update channel pattern

* src: Remove useless non-capture group

* src: it's as though we're starting fresh

* src: Bring this up to date for reals now

* src: typings and a bug fix

* src: Add crossposted channels to message mentions

* src: Requested changes and add typings

* src: Move Object.keys outside loop

* typings: Fix enum being exported when it shouldn't

* src: Consistency with roles and users

* docs: Correct docstring for MessageFlags#flags

* docs: Correct docstring for MessageMentions#crosspostedChannels

* docs: Suggestions
Co-authored-by: SpaceEEC

* src: Reset flags to 0 if no flags are received on MESSAGE_UPDATE
2019-10-01 11:01:55 +02:00
Ryan Munro
505df2ebb3 backport(Guild): createChannel's default type incorrectly set (#3497)
Backports #3496 (a03e439d6b) to the 11.5-dev branch
2019-10-01 10:59:02 +02:00
Ryan Munro
a03e439d6b fix(GuildChannelStore): default channel type incorrectly set (#3496) 2019-10-01 10:56:14 +02:00
Jiralite
41c0dd44eb fix(BitField): throw when resolving invalid string constant
Checked to see if the permission actually exists.
2019-10-01 10:46:49 +02:00
Vlad Frangu
ea8b4e7355 docs/typings: Rename LURKABLE to PUBLIC and update GuildFeatures type (#3484)
* docs: Rename LURKABLE to PUBLIC

* typings: Update GuildFeatures type
2019-09-25 23:28:12 +02:00
Gryffon Bellish
d280d1b03f style: change let to const in MessageMentions (#3483) 2019-09-24 17:36:19 +02:00
Ryan Munro
60f89bd96f fix(stores): Add symbol.species for not-actual-stores (#3477)
* fix(stores): Add symbol.species for not-actual-stores

* Linting fixes
2019-09-22 23:50:41 +02:00
Vlad Frangu
748555036d typings: Add missing rateLimitPerUser property (#3480) 2019-09-22 17:07:44 +02:00
BadCoder1337
d05334fd3c typings: make TypeScript interaction with channels better (#3469)
* make channel returning methods generic

* channel's type inference from kind of channel

* add extends

* rename generic due to name convention

* edit overload

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts


Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2019-09-19 23:01:08 +02:00
1Computer1
d5831df7b1 fix: typings for this-polymorphism of collections (#3472)
* Fix typings for this-polymorphism of collections

* Update index.d.ts


Co-authored-by: Crawl <icrawltogo@gmail.com>
2019-09-18 00:53:00 +02:00
iCrawl
ea9e144190 fix(typings): remove leftover typeof 2019-09-11 02:11:31 +02:00
iCrawl
33ecdd4c50 fix(typings): collection constructor 2019-09-11 01:58:12 +02:00
Crawl
ac44a7fc57 fix(typings): collections import 2019-09-10 20:34:47 +02:00
Crawl
321beb73bd revert: "feat(Partials): add DMChannel/MessageReaction#fetch()… (#3468)
This reverts commit b0047c424b.
2019-09-10 19:49:56 +02:00
1Computer1
dad0cd8e81 feat: external collection package (#2934)
* Use external collection package

* Complete typings

* Document properly base collection class

* Add clone since sort is now in-place

* Update for latest changes to package

* Fix whitespace

* Update docs link

* Oops

* Update Collection.js

* Update index.d.ts
2019-09-10 17:44:47 +02:00
bdistin
278f185b64 fix(rate-limits): reactions buckets need to be shared with sub-… (#3439) 2019-09-10 17:29:44 +02:00
Charalampos Fanoulis
8dec251d3c github: add support file and redirect to it (#3302)
* github: add support file and redirect to it

* github: happily accept that suggestion
2019-09-10 17:14:07 +02:00
newt
37ecf7b826 feat(constants): add verificationLevels (#3369)
* add Util.parseVerification()

* Made the code much cleaner.

* Removed method and created constant.

* Lint!

* refactor(constants): capitalize VerficiationLevels and add a typedef

* Changed VerificationLevels typedef to singular.

Co-Authored-By: Will Nelson <will@wnelson.xyz>
2019-09-10 16:12:27 +02:00
izexi
b0047c424b feat(Partials): add DMChannel/MessageReaction#fetch() and Parti… (#3261)
* add DMChannel#fetch() & Action#getChannel({recipients})

* ref for MessageReaction partial

* typings

* add PartialTypes.REACTION

* accommodate for fully removed reactions

* fix incorrect wording and typo

* typings: MessageReaction#count is nullable

* typings: mark MessageReaction#partial as readonly

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* fix(User): fetch dm channel if cached one is partial

* docs: add missing comma

Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
2019-09-10 16:09:06 +02:00
Carter
6f83e71555 feat: Guild#partnered (#3444)
* feat: Guild#partnered

* typings: added Guild#features

* fix: removed trailing space

* typings: made Guild#partnered readonly
2019-09-10 15:47:13 +02:00
SpaceEEC
8e0f525d91 fix(Role): throw TypeError in comparePositionTo (#3466) 2019-09-10 15:44:49 +02:00
SpaceEEC
4072ffb50d typings(GuildChannel): add members getter (#3467) 2019-09-10 15:44:00 +02:00
Will Nelson
c86a6154aa feat(VoiceState): add kick method (#3462)
* feat(VoiceState): add kick method

* feat(typings): add types for VoiceState#kick method
2019-09-10 10:00:04 +01:00
Ryan Munro
a6810e2eaa feat(Permissions): add new method Permissions#any (#3450)
* Add new method Permissions#any

* Update src/util/BitField.js

This is much better

Co-Authored-By: bdistin <bdistin@gmail.com>

* Remove unreachable code

* Gotta keep the linter happy

* Apply bdistin suggested change to both methods
2019-09-10 10:55:42 +02:00
iCrawl
4fc461c2f9 fix: browser-compatability
Fix #3453
2019-09-08 11:47:46 +02:00
iCrawl
6e616edc69 chore: keep_classnames literally everywhere 2019-09-08 11:46:47 +02:00
iCrawl
c71454f312 chore: add more voice files to ignore for webpack 2019-09-08 11:46:11 +02:00
Antonio Román
d252ddf9da docs: Document Message#author as nullable (#3464)
Fixes #3463
2019-09-08 09:49:10 +02:00
iCrawl
c5cbf8677e feat(typings): reply overloads for splitmessage 2019-09-06 12:03:21 +02:00
Schuyler Cebulskie
89a3a3a6da Lowercase webpack (their branding, not mine) 2019-09-04 01:04:31 -04:00
Schuyler Cebulskie
827cab805e Clean up workflows 2019-09-04 01:02:01 -04:00
BannerBomb
5d95a4b264 fix: Util#splitMessage when destructured (#3456) 2019-09-03 16:24:20 +02:00
iCrawl
0a2003095d ci: consistency in naming 2019-09-03 16:18:56 +02:00
iCrawl
0c14616ffc ci: reduce the amount of yml files 2019-09-03 16:08:25 +02:00
iCrawl
e7a961781c ci: add webpack workflow 2019-09-03 16:04:36 +02:00
iCrawl
fe71cecc2a ci: use the correct command 2019-09-02 13:27:34 +02:00
iCrawl
3ce60212e6 ci: run a lint cronjob every 12h 2019-09-01 15:41:07 +02:00
Schuyler Cebulskie
45af62a621 Update typings for renamed shard events 2019-08-31 17:18:18 -04:00
Schuyler Cebulskie
4b34f1acbe Remove past-tense naming on shard events 2019-08-31 17:14:48 -04:00
Yukine
9e6a73d1a0 typings(Client): remove 'resume', add 'replayed' parameter to 'shardResumed' (#3455)
corrected shardResumed & removed old resumed event
2019-08-31 22:17:46 +02:00
Crawl
89d9b0f498 fix(typings): partially revert #3448 2019-08-29 20:16:38 +02:00
Vlad Frangu
43c0a794e1 fix(GuildAuditLogsEntry): default to object with id for deleted targets (#3373) 2019-08-28 11:22:25 +02:00
izexi
2a3fb705d0 fix(ChannelStore): return existing DMChannels within add() (#3438)
* fix: return existing DMChannels

* ref: group nested conditions
2019-08-28 11:13:09 +02:00
didinele
745a0ea942 typings(DataStore): correct return types for resolve, resolveID and remove (#3448)
* fix(typings): DataStore#resolve & DataStore#resolveID can also return null.

* fix(typings): DataStore#remove returns a boolean, not void.

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-08-28 11:11:15 +02:00
Ryan Munro
dcee09c308 backport(Permissions): backport STREAM permission from #3309 (#3447)
* Backport the STREAM permission

* Update typings and default
2019-08-28 11:09:45 +02:00
Gryffon Bellish
4c08812302 docs(ClientOptions): document unit of restRequestTimeout (#3449) 2019-08-26 18:52:30 +02:00
iCrawl
8bbf1a9228 ci: remove leftover docs action 2019-08-25 07:45:45 +02:00
iCrawl
6baff9e3fc ci: change job name for docs 2019-08-24 22:26:08 +02:00
iCrawl
08dfdcb4eb ci: deploy docs using new action 2019-08-24 22:17:40 +02:00
iCrawl
57033f3334 ci: add npm install steps 2019-08-24 20:31:12 +02:00
iCrawl
fd49082ac0 ci: run ci in parallel 2019-08-24 20:28:44 +02:00
iCrawl
1511e96761 ci: run docs excluding 2019-08-24 19:45:52 +02:00
iCrawl
4f9e7f4a23 ci: remove travis 2019-08-24 19:32:40 +02:00
Crawl
e8451561ed ci: github actions (#3442)
* feat: eslint action

* refactor: actions v2

* fix: set +x for entrypoint

* ci: integrate docs

* fix: give it a nice name

* ci: publish docs

* ci: fix yaml key error

* ci: fix executable

* ci: use normal sh shebang

* ci: move into the workspace

* ci: fix eslint path

* ci: manually run the build

* ci: use different container

* ci: install git

* ci: assume yes flag

* ci: use correct branch

* ci: fix branch and source

* ci: fix condition

* ci: remove useless steps

* ci: rename action

* ci: make executable again

* ci: cleanup

* ci: add stable branch

* ci: remove semi

* ci: do some logging for failing action

* ci: remove actions api

* ci: re-add semi

* ci: use actions repo

* ci: use v1 tags

* ci: remove semi

* chore: change job name passed to eslint

* chore: dummy commit, remove different semi

* ci: change job name

* chore: dummy commit

* ci: add gh-actions as possible branches

* ci: lint all branches

* ci: dummy

* ci: separate pr and push

* chore: run actions on gh branch

* ci: try excluding branches
2019-08-24 19:32:18 +02:00
Amish Shah
c715ed9f8b voice: remove passes
(discord will begin dropping duplicated audio packets from tomorrow, you should not set passes > 1)
2019-08-22 12:15:20 +01:00
Carter
cc488a8bd3 fix: GuildMemberStore#_fetchMany (#3420)
* added DARK_MODE_INVISIBLE

added another constant color that makes embeds appear invisible on DARK mode.

* travis likes trailing commas

* fix: ref issue: #3414

* fix: removed a random color
2019-08-21 16:52:08 +01:00
Vlad Frangu
5e4f9d436d src: alphabetize guild features and make sure they're up to date (#3441) 2019-08-21 12:52:35 +01:00
Vlad Frangu
fbd811517a src: Update Webhook#sendSlackMessage to be accurate with what the API returns (#3429)
* src: Update sendSlackMessage

* typings
2019-08-19 21:02:33 +01:00
Saya
e4309b23d5 feat: abort Requests that takes a lot of time to resolve (#3327)
* Add Request Timeout

* Add abort controller in packages

* Fix Lint Error.

* Fix Lint Errors

* Make Timeout Customizable & use finally

* Fixed a minor issue

* Fix eslint

* Update request timeout to use d.js client timeout methods.
2019-08-19 18:55:07 +02:00
neoney
3fcc862c5f docs: fix voice broadcast example code (#3436)
client.createVoiceBroadcast() -> client.voice.createBroadcast()
2019-08-18 11:54:30 +02:00
SpaceEEC
c786867bd6 fix(Webhook): return raw data if the channel is unavailable
Fixes #3424
2019-08-18 11:45:28 +02:00
Khoo Hao Yit
1851f74770 fix(ReactionUserStore): remove method firing messageReactionRemove event twice (#3277) 2019-08-17 21:09:29 +02:00
Koyamie
12b48b7cbb fix(GuildMemberRoleStore): correctly reference the everyone role (#3434) 2019-08-17 20:57:14 +02:00
izexi
d62db232e7 feat(Invite): add targetUser(Type) (#3262)
* add Invite#targetUser(Type)

* incase discord decides to add 0
2019-08-17 20:31:04 +02:00
Khoo Hao Yit
8ae7a30d0b fix(Message): delete method caused messageDelete event to fire twice (#3252)
* ref: add getPayload and use for other get* methods

* return existing data.*

* use Action.getUser()

* Fix messageDelete double emission
2019-08-17 19:33:03 +02:00
Gryffon Bellish
ab27dd0218 refactor(TeamMember): remove client from constructor (#3409)
* Remove client from TeamMember constructor part 1

* Remove client from TeamMember constructor part 2

* update typings
2019-08-17 18:24:16 +02:00
BannerBomb
b662678f21 feat/fix(Util): fix animated part of parseEmoji regex and make id optional (#3407)
* Small changes to parseEmoji regex

I just made a small change to the parseEmoji regex, this change will make an invalid emoji, like `<aname:id>` return as null, before this change it would return as an animated emoji because the name started with an `a` which would result in false positives, then the `?` I added to the end of `(\d{17,19})?` is used if someone provided an emoji as `:name:` or `a:name:` it will return the correct values but have an invalid id.

* Update Util.js

2nd Update: I changed the regex to output the results if you provide `<aemoji:123456789012345678>` and <:aemoji:123456789012345678>` which will output `{ animated: false, name: "aemoji", id: "123456789012345678" }` or `<:emojiname:>` which outputs `{ animated: false, name: "emojiname", id: null }` or `<a:emoji:>` which would output `{ animated: true, name: "emoji", id: null }`. Before this PR the method would return that the emoji was animated if you provided something like `<anemojiname:emoji_id>` because the name started with an `a`.
2019-08-17 18:07:58 +02:00
didinele
2df4f227a4 refactor: move Guild#defaultRole to RoleStore#everyone (#3347)
* remove guild#defaultRole

* add RoleStore#defaultRole

* typings

* fix trailing space

* another one

* Rename it to everyone
2019-08-17 18:02:17 +02:00
bdistin
6d3c55b68c feat(Collector): allow collectors to be consumed by for-await-of loops (#3269) 2019-08-17 17:57:45 +02:00
Carter
7fae6e5bca typings: switch overloads of RoleStore#fetch (#3397)
because compu told me to
2019-08-17 17:51:52 +02:00
Robin Millette
f55e4302c9 github: fix duplicate key in FUNDING.yml (#3380)
Comment out (keep for reference) unused platforms. Also fixes a duplicate `github` key.
2019-08-17 17:50:49 +02:00
Amish Shah
c6e8fccbf0 voice: fix #3418
(kicking bot from voice channel doesn't allow it to rejoin)
2019-08-17 13:42:22 +01:00
Amish Shah
2c4d14a71b voice: remove redundant debug info 2019-08-14 19:22:41 +01:00
Amish Shah
f79f024343 fix: bots being unable to connect 2019-08-12 21:40:26 +01:00
Vlad Frangu
9e76f23314 fix(GuildMemberStore): reject BAN_RESOLVE_ID error instead of throwing it (#3425) 2019-08-10 12:22:11 +02:00
iCrawl
d14db52158 fix(typings): send overloads 2019-08-04 15:57:39 +02:00
SpaceEEC
1121b2f7bf fix(GuildChannel): return GuildChannel in setPosition instead of Guild
fixes #3413
2019-07-30 17:46:22 +02:00
Crawl
5af8cb8e6e feat: overload for split always returning an array (#3411)
* feat: overload for split always returning an array

* feat: update Util.splitMessage
2019-07-30 00:25:45 +02:00
TNThacker2015
e645dd6358 feat: Util.splitMessage always return an array (#3035)
* Making Util.splitMessage always return an array

Util.splitMessage sometimes returns an array, but other times it returns a string. This should make it so that it always returns an array.

* jsdoc

Co-Authored-By: TNThacker2015 <37024464+TNThacker2015@users.noreply.github.com>

* docs(Util): remove superfluous space in docstring
2019-07-30 00:25:35 +02:00
Lewis
53722b47c1 chore(license): update copyright notice (#3408) 2019-07-30 00:00:56 +02:00
Alex
e562564123 docs(Guild): add missing features (#3406)
* Update Guild.js

* Update Guild.js

* style(Guild): remove trailing space

* typings(Guild): add new features
2019-07-28 15:24:27 +02:00
Kitten King
d8516efa36 docs: fix typos (#3404) 2019-07-25 17:18:23 +02:00
Crawl
651ff81bd5 fix: update issue templates 2019-07-13 18:02:07 +02:00
MoreThanTom
547bf83100 feat(typings): constants export (#2915)
* Added typings for Constants export

* Full typing of list Constants

* Fix mistake in Package typing

* Cleanup for requested changes

moved fs import to import cluster
WSEvents using WSEventType to build type

* Satisfy tslint rules

* Update Constants.js

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts

* Update index.d.ts
2019-07-12 17:02:45 +02:00
bdistin
00c4098bb3 refactor(Util.escapeMarkdown): allow separate escaping and add tests (#3241)
* wip refactor

* add escapeMarkdown tests

* italics can be done with a single underscore too

* more refined

* fix test name

* unnecessary eslint ignores

* use jest

* make eslint less annoying in this test file

* more testing

* fix lib usage

* more tests and a small fix
2019-07-11 22:08:40 +02:00
Eduardo Londero
f1433a2d97 feat(Collector): add idle time for a Collector to stop itself (#2942)
* Implement idle feature

* Add typings

* Minimal fixes

* Make everything in Collector and not attached to ReactionCollector

* set this._idletimeout to null when collector ends

* also set this._timeout to null when collector ends
2019-07-11 21:40:12 +02:00
SpaceEEC
0cd7556934 feat(Teams): backport support for teams (#3357)
* feat(Teams): backport support for teams

PR #3350
Commit: a22aabf6a8

* fix(TeamMember): fix name of client property

* refactor(OAuth2Application): make team nullable instead of optional

* typings(OAuth2Application): make team nullable instable of optional

* docs(OAuth2Application): deprecate and add an info to team property
2019-07-11 13:10:54 +02:00
Jisagi
adb082305d feat(Guild): add banner to edit method and add setBanner method (#3364)
* add setBanner method to Guild

* typos fixed & typings added

* more typings

* docs(Guild): add banner to GuildEditData
2019-07-11 13:09:43 +02:00
Vlad Frangu
4069d009d1 misc: automatically add labels to issues that use a template (#3367)
* misc: Automatically add labels to issues that use the template

* misc: Ditto

* misc: DITTO
2019-07-11 12:59:19 +02:00
Skillz4Killz
20d7b3de59 docs/typings(VoiceStateStore): document and type the class (#3294)
* Update index.d.ts

* Update Guild.js

* Update Guild.js

* docs/typings(VoiceStateStore): document and add typings
2019-07-04 16:20:28 +02:00
SpaceEEC
b65a4f05da fix(ClientApplication): fix ternaries 2019-06-26 20:19:05 +02:00
SpaceEEC
1dd4c041e0 fix(ClientApplication): owner is still nullable
Fixes #3358
2019-06-26 20:12:05 +02:00
SpaceEEC
4c11347511 docs(Team*): fix appliction -> team, tag -> mention 2019-06-26 11:42:03 +02:00
Vlad Frangu
61e2e3e1ad docs: add zucc to docsite welcome page (#3355) 2019-06-26 11:36:11 +02:00
SpaceEEC
d7b2146c81 refactor(TeamMember): make id a getter 2019-06-25 20:40:15 +02:00
bdistin
a22aabf6a8 feature: teams support (#3350)
* basic teams support

* export Team & TeamMember

* use typedef

* typings and some fixes

* Update src/structures/TeamMember.js

Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com>

* fix Team#iconURL()

* fix typings and a bug

* fix states start at 1

* team icon hash can be null

* fix owner typings
2019-06-25 20:31:48 +02:00
anandre
6100aceef2 docs(RoleStore): update -> create in create method (#3349)
Under `create`, change `update` -> `create` in the description
2019-06-19 18:49:33 +02:00
SpaceEEC
c355236f7f feat(Emoji): backport delete method (#3343)
This backports #1877 (c93c4ad21f) in a semver-minor manner.
2019-06-16 10:07:32 +02:00
SpaceEEC
b8924369ea feat(Guild): add support for premium/boosting (#3332)
Backports:
PR: #3316
Commit: c87758086b
2019-06-13 19:03:36 +02:00
SpaceEEC
e6a378b361 feat(Guild): backport misc properties and setRolePositions (#3337)
* feat(Guild): backport misc properties and setRolePositions

PRs:
* #3168
* #3317

* typings
2019-06-13 18:33:07 +02:00
SpaceEEC
1bec28bd81 feat(Guild): default iconURL to gif if animated (#3338)
* feat(Guild): default iconURL to gif if animated

* Icon, not Banner

* fix url
2019-06-13 14:14:47 +02:00
Ryan Munro
f82f0af928 docs(Presence): document client property (#3342) 2019-06-12 21:54:12 +02:00
SpaceEEC
6cd4c27fae docs(Client): fetchVoiceRegions returns a promise 2019-06-08 16:18:50 +02:00
SpaceEEC
6f49aadf4f fix(Guild): allow fetchMember to be used with an uncached user (#3333) 2019-06-08 10:39:03 +02:00
Alex
19ef45130b docs(Guild): add missing features (#3336)
The addition of missing guild features that were added in the Nitro boost update, such as ANIMATED_ICON
2019-06-08 10:38:45 +02:00
SpaceEEC
4a2335c69c docs(*Resolvable): make them appear on the docs
I don't know what part of the docgen is not working properly, but this seems to fix those typedef
to not appear on the documentation
2019-06-05 22:18:06 +02:00
SpaceEEC
8e1857286d typings(Guild): add typings for setRolePositions
See:
PR: #3317
Commit: 8bc8ffe168
2019-06-05 22:18:01 +02:00
brian
8bc8ffe168 feat(Guild): add setRolePositions method(#3317)
Allows for role positions to be batch-updated similar to how channel
positions are. It uses the Discord API endpoint PATCH /guild/:id/roles
2019-06-05 21:57:31 +02:00
Skillz4Killz
e87e4a6f0e typings(GuildChannelStore): add CategoryChannel as possible return value (#3326) 2019-06-05 21:46:11 +02:00
Saya
ddcc6cfec9 docs(Constants): add missing GUILD_EMOJIS_UPDATE to WSEvents (#3325) 2019-06-05 21:37:10 +02:00
izexi
c87758086b feat: add support for premium guilds (#3316)
* add premiumTier and premiumSubscriptionCount

* add premiumSinceTimestamp and premiumSince

* add premium message types

* typings

* add GuildEmoji#available

* fix doc description
2019-06-05 21:34:33 +02:00
Gryffon Bellish
0c6101901d fix(docs): backport documentation for Presence#clientStatus (#3315)
* backport documentation for Presence

* capitalize o

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* remove extra space

* backport ClientPresenceStatus

* Change to Client Presence Status
2019-06-01 20:24:22 +02:00
Deivu (Saya)
405bdb5b55 cleanup(Constants): remove duplicate VOICE_STATE_UPDATE (#3313) 2019-05-31 09:06:28 +02:00
DeJay
5aa9425040 Removes the trace packet (#3312)
* Removes the trace packet

* Update src/client/websocket/WebSocketShard.js

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

* Update src/client/websocket/WebSocketShard.js

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>
2019-05-30 19:57:34 +01:00
bdistin
5154850a54 Add Stream permission (#3309)
* Add Stream permission

* update docs, and DEFAULT

Created a new guild to test DEFAULT

* update typings
2019-05-30 08:26:49 +01:00
Amish Shah
5dd9181497 v11.5.1 2019-05-29 21:23:16 +01:00
SpaceEEC
db492e66e2 chore: explicitly mark everything deprecated as @ deprecated (#3307) 2019-05-29 22:18:14 +02:00
Amish Shah
8652e47c14 fix: decode voice ws data as json 2019-05-28 14:51:41 +01:00
Amish Shah
b5aff6d120 remove member voice state after emitting leave event 2019-05-28 10:00:57 +01:00
Will Nelson
d34b62414b fix: StreamOptions#volume typings (#3303) 2019-05-27 20:56:40 +01:00
Gus Caplan
065908956b fix websocket unpacking (#3301) 2019-05-27 18:13:25 +01:00
Amish Shah
db56e0cbae fix: delete VoiceStates even for uncached members 2019-05-27 18:09:54 +01:00
Amish Shah
949488bbbd Fix #3218 2019-05-27 14:04:13 +01:00
Amish Shah
1ce670daa9 Create FUNDING.yml
Just trialling it out
2019-05-26 10:33:58 +01:00
Will Nelson
9ca36b8eea typings(VoiceState): add connection getter (#3292)
* fix: add connection to voice state typings

* Update typings/index.d.ts

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>
2019-05-25 16:18:44 +02:00
izexi
3f1232ebf3 feat: throw custom error for uncached Guild#me (#3271)
* handle cases where Guild#me is uncached

* fix id prop

* remove unnecessary checks

* space's requested changes
2019-05-25 13:50:32 +02:00
anandre
34006cb51e docs(StreamDispatcher): specify pausedTime is in milliseconds (#3295)
* Update TextChannel.js

Update `setRateLimitPerUser` description to specify the `number` is in seconds, per the Discord docs

* Update TextChannel.js

Add unit to the rateLimitPerUser property

* Update GuildChannel.js

* Update StreamDispatcher.js

Specify unit for `StreamDispatcher.pausedTime`
2019-05-24 20:33:40 +02:00
SpaceEEC
97f3b6c5eb typings(Guild): remove voiceConnection, add voice, cleanup rest
Fixes #3293
2019-05-24 15:42:09 +02:00
Antonio Román
b3060ea229 typings(Collection): use T in accumulator and initialValue when reducing (#3284)
This brings some consistency with Array#reduce's typings and to reality.
2019-05-20 20:49:28 +02:00
bdistin
8c213e9088 fix(Message#pinnable): you can't pin system messages (#3279) 2019-05-18 19:06:15 +02:00
bdistin
abebeac193 fix(Message#pinnable): you can't pin system messages (#3279) 2019-05-18 19:02:23 +02:00
SpaceEEC
06b72ee19f fix(GuildMember): do not create a channel key when editing
This is to not break GuildMember#setNickname for the current user
2019-05-18 14:08:50 +02:00
SpaceEEC
3ad16fa351 fix(GuildMember): do not create a channel key when editing
This is to not break GuildMember#setNickname for the current user
2019-05-18 14:08:12 +02:00
didinele
97de79bd5e fix(typings): Guild#member can return null (#3274)
* fix(typings): Guild#member did not have undefined as a return type

* oops, it can apparently return null
2019-05-16 21:14:45 +02:00
SpaceEEC
1bafa4b86b fix(READY): do not overwrite Client#user when reidentifying
See #3216, this commit attempts to fix losing ClientUser#_typing, which results in no longer being able to clear typing intervals
2019-05-16 19:56:19 +02:00
Fong Jian Ping
e3d03adcf8 docs(ChannelCreationOverwrites): revert incorrect rename of "id" property (#3273)
Reverts one incorrect change made in #2734 (3021e5ce7f (diff-e5c54069adfa0d32480eb3cc9faeee20L979))

* Fix incorrect docs in Guild.js

* Update src/structures/Guild.js

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* Update Guild.js
2019-05-16 13:06:07 +02:00
anandre
363cec31bc docs(TextChanne): specify unit of rateLimitPerUser (#3272)
* Update TextChannel.js

Update `setRateLimitPerUser` description to specify the `number` is in seconds, per the Discord docs

* Update TextChannel.js

Add unit to the rateLimitPerUser property

* Update GuildChannel.js
2019-05-15 22:42:39 +02:00
anandre
55447fd4da docs(TextChanne): specify unit of rateLimitPerUser (#3272)
* Update TextChannel.js

Update `setRateLimitPerUser` description to specify the `number` is in seconds, per the Discord docs

* Update TextChannel.js

Add unit to the rateLimitPerUser property

* Update GuildChannel.js
2019-05-15 22:33:27 +02:00
SpaceEEC
16fcfa3db3 fix(WebSocketManager): rethrow unknown errors when connecting a WebSocketShard 2019-05-15 22:13:12 +02:00
SpaceEEC
c844a7b4e2 docs(Guild): fix typo in example of createChannel 2019-05-14 20:12:57 +02:00
Amish Shah
72dd872fce VoiceBroadcast.{dispatchers -> subscribers} 2019-05-12 20:29:28 +01:00
Schuyler Cebulskie
e82633fb00 Bump version to 11.5.0 2019-05-11 19:05:10 -04:00
Schuyler Cebulskie
b2f89e4594 Add testing for Node.js 8-12 2019-05-11 19:00:03 -04:00
Schuyler Cebulskie
8fba786765 Update typings for news/store channels 2019-05-11 18:56:14 -04:00
Schuyler Cebulskie
43f2485c9c Document news/store channel types on Guild#createChannel 2019-05-11 18:11:34 -04:00
Schuyler Cebulskie
8a086e04ab Add news/store channel support to CHANNEL_CREATE 2019-05-11 18:11:19 -04:00
Schuyler Cebulskie
f30019dd4f Remove unnecessary import 2019-05-11 17:24:25 -04:00
Schuyler Cebulskie
5e4654ee07 Backport news/store channels 2019-05-11 14:58:46 -04:00
izexi
75d5598fda import TextDecoder from Util (#3258) 2019-05-08 21:03:18 +01:00
izexi
0dd3ed72ef fix(Partials): Client#event:messageUpdate(oldMessage) and MessageReactionAdd on guild channels (#3250)
* ref: add getPayload and use for other get* methods

* return existing data.*

* use Action.getUser()
2019-05-07 20:56:39 +01:00
Gus Caplan
3d4513268d Add optional zstd for faster WebSocket data inflation (#3223)
* zstd
2019-05-07 14:30:34 +01:00
Darqam
8915bc1d37 docs:(Client): disambiguate the description of channels collection (#3251)
* Disambiguate the description of <client>.channels

Although not explicitly said, the current wording makes it seem like all channels are cached and available at any time in this store. Hopefully this variation makes it a bit clearer.

* make more explicit (I think)

* remove trailing white spaces
2019-05-06 20:08:56 +02:00
SpaceEEC
ee42bdfd76 feat(GuildMember): add support for voice kicking (#3246)
This backports e64773e21b (#3242)
2019-05-06 19:18:29 +02:00
SpaceEEC
67da457c0a fix/docs(Client): type status and do not throw an error if accessed before login 2019-05-05 13:44:34 +02:00
SpaceEEC
60013b7a10 fix(WebSocketConnection): stringify data when no websocket is available
[object Object] is not really descriptive
2019-05-04 21:00:49 +02:00
SpaceEEC
8b83e2fdcb typings(Presence): add missing guild property 2019-05-04 19:05:04 +02:00
Amish Shah
e64773e21b Add ability to kick members from VoiceChannels and remove duplicated methods (#3242)
* feat(voice): kick members from voice channels

* fix(VoiceState): improve stability in checking for client user

* feat(VoiceState): add setChannel for moving/kicking members

* update typings

* remove duplicated methods across GuildMember and VoiceState

member.setDeaf => member.voice.setDeaf
member.setMute => member.voice.setMute
member.setVoiceChannel => member.voice.setChannel
2019-05-04 16:46:42 +01:00
Amish Shah
d7f8fd1ae0 fix #3244 2019-05-04 16:21:49 +01:00
izexi
176fc47699 feat(Actions): use partials for messageDeleteBulk (#3240)
* make use of partials

* don't cache the messages

* pass each message within the for..of iteration
2019-05-03 17:38:57 +02:00
Jacz
692494dc04 feat(VoiceState): self mute/deaf methods (#3243)
* Implemented setSelfMute/Deaf, done typings, fixed bug in VoiceState with errors.

* Completed requested changes

* return send in sendVoiceStateUpdate so its a promise, update typings

* Updated methods to return a boolean

* Requested changes

* Fix bug

* Update src/structures/VoiceState.js

Co-Authored-By: MrJacz <23615291+MrJacz@users.noreply.github.com>

* fix
2019-05-03 17:11:11 +02:00
Vlad Frangu
a59968f7de src: add news and store channels, and missing guild props (#3168)
* src: Implement store and news channels!

* src: Remove code dupe

* src: Add missing guild properties

* docs: Add a small notice that the channel type may also change

* src: Remove re-creation of the MessageStore

* lint: Unused Import

* src: Requested changes for StoreChannels

* typings: Fix typings

* src: Moar guild updates

* src: Set maximumPresence to the data prop, the already existent one, or default to 5000

* typings: afkChannel is a VC

I keep confusing them, ffs

Co-Authored-By: vladfrangu <kingdgrizzle@gmail.com>

* docs: Document that maximumMembers and maximumPresences may be inaccurate before fetching

* src Appels requested changes
2019-05-03 17:08:07 +02:00
Amish Shah
0d9bc8664d voice: make Guild.voice more robust 2019-04-29 19:31:31 +01:00
Amish Shah
bcb0cd838b voice: remove Guild.voiceConnection and VoiceChannel.connection 2019-04-29 19:29:16 +01:00
Amish Shah
dd44647537 voice: Guild.voiceConnection => Guild.voice.connection 2019-04-29 19:24:27 +01:00
Amish Shah
ce1e3d2084 feat(VoiceConnection): add .voice 2019-04-29 19:13:41 +01:00
bdistin
2666a9d6db feat(MessageStore): add remove() (#2468)
* MessageStore#remove()

* typings
2019-04-29 17:53:32 +01:00
Vlad Frangu
d7a9b74523 src: Replace instanceof Array checks with Array.isArray and instanceof Buffer with Buffer.isBuffer (#3227)
* src: Replace instanceof Array checks with Array.isArray

* src: Buffer.isBuffer instead of instanceof Buffer
2019-04-29 17:49:41 +01:00
bdistin
9b0f4b298d feature: public raw events (#3159)
* add a public alternative to the private raw event

while retaining raw for use in debugging privately

* only emit dispatch packets

* requested changes

TIL, that's neat

* fix padding

* requested changes

* Update WebSocketManager.js
2019-04-29 17:37:57 +01:00
izexi
870528ed33 feat(VoiceChannel): add editable (#3173)
* add VoiceChannel#editable

* replace unnecessary super with this

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-04-29 17:35:48 +01:00
izexi
23191da13d feat(Partials.GuildMember): GuildMemberRemove & Guild#me (#3229)
* use partials for GuildMemberRemove & Guild#me

* oops

* guild.members instead of Action.members

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-04-29 17:05:52 +01:00
Vlad Frangu
bc31746621 src: Client#readyAt should be updated when triggerReady is called (#3234) 2019-04-29 17:03:29 +01:00
Crawl
aa253d9551 fix(ClientUser): lint 2019-04-28 13:14:26 +02:00
Amish Shah
4e0cf87d0f fix: typing map being reset for ClientUser (#3216) 2019-04-27 18:52:26 +01:00
Amish Shah
e0cfb7fb36 fix: not checking for guild when creating a channel 2019-04-27 13:39:23 +01:00
Amish Shah
4d7fc036a1 fix: channels being removed from guild.channels 2019-04-27 11:46:48 +01:00
Vlad Frangu
577636a46d src: fix random broken reconnects (#3233) 2019-04-27 08:25:24 +01:00
Vlad Frangu
de79bba965 src: Fix type error in WebSocketShard#onError (#3231) 2019-04-24 16:53:41 +02:00
izexi
7b531648e0 feat(GuildMemberStore) add options.count to prune (#3189)
* add GuildMemberStore#prune(options.count)

* typings: proper typings for null return value
2019-04-23 21:59:52 +02:00
SpaceEEC
39115c8acc fix(MessageCreateAction): remove redundant GuildMemberStore#add call
This was also causing a bug where GuildMember#_roles was patched with a GuildMemberRoleStore
2019-04-23 21:21:41 +02:00
SpaceEEC
6a07715c1d fix(Guild): only update emojis when they are present in the payload 2019-04-23 21:02:16 +02:00
Vlad Frangu
75cd260808 src: Don't use the GuildMemberRoleStore to patch the GuildMember _roles (#3226)
* src: Don't use the GuildMemberRoleStore for patching GuildMember#_roles

* src: Remove usage of _patch from the store

* src: Finish up clone changes
2019-04-23 19:44:02 +01:00
didinele
3f6d08a499 fix(typings): Collection#find & findKey can return undefined (#3228)
* fix(typings): [Collection#find](https://github.com/didinele/discord.js/blob/master/src/util/Collection.js#L172) can also return undefined

* same thing for findKey
2019-04-23 18:47:42 +02:00
Amish Shah
23e6414420 fix: old objects not being cached (#3225)
please post issues if you find any, will probably cause some
2019-04-23 11:32:03 +01:00
izexi
c4b79571ba feat(Invite): add deletable getter (#3203)
* add Invite#deletable

* fix ci

* reee

* since guild is nullable

* accommodate for external invites

* nit(Invite): use guild instead of channel.guild
2019-04-22 09:24:32 +02:00
izexi
f7f4607b5f docs(faq): bump to node 10.0.0 (#3224) 2019-04-22 09:09:06 +02:00
anandre
d1778772cd docs: update node version requirement, npm install links, add update guide (#3220)
* Update welcome.md

Update node version requirement, npm install links, docs links, made a note that the guide is for stable and added a new link to the WIP update guide.

* docs(welcome.md): put notice for wip update guild on its own line

* docs(welcome.md): indent own line

* docs(README.md): apply the same changes here
2019-04-21 13:47:09 +02:00
Antonio Román
01c708bc75 feat(Sharding): change waitForReady to spawnTimeout (#3080)
This means that you'll not only be able to choose between having a timeout or not, but also to set the amount of milliseconds as you wish.
2019-04-21 13:34:09 +02:00
Purpzie
abd9d36816 feat(Util): resolve text parameter of splitMessage to a string (#3212) 2019-04-21 09:38:09 +02:00
Dragoteryx
52b4f09e58 fix(Structures): allow multiple extensions by checking prototype chain (#3217) 2019-04-21 09:34:12 +02:00
Vlad Frangu
1514df0f87 fix: emit resume event, silent disconnects, error event param (#3192)
* src: Fix shardResumed event not being emitted

* docs: Document Client#error again

* src: Fix onError due to incorrect typings

* src: handle onError properly for both uws and ws

* src: Try to fix silent disconnects when using uWs

* fix(WebSocketShard): uws emits plain objects, not errors

Emitting line of code: 39aa429f94/src/uws.js (L80-L83)
Listener attaching is here: https://github.com/discordjs/uws/blob/master/src/uws.js#L128
For reference, found a clue here: https://github.com/discordjs/discord.js/issues/1528
2019-04-21 09:32:16 +02:00
SpaceEEC
cde955c766 fix(PresenceUpdateAction): emit presences again (#3214)
* fix(PresenceUpdateAction): emit presences again

* update typings
2019-04-19 08:49:17 +02:00
Gryffon Bellish
bccbb550b0 docs(Collector): specify the unit for CollectionOptions#time (#3219) 2019-04-19 08:47:39 +02:00
SpaceEEC
12e041bc2b typings(GuildChannel): add manageable getter 2019-04-17 21:39:46 +02:00
Deivu (Saya)
b5320299f7 Only reset sessionID when close code is 1000 or 4006 (#3213)
* Event code 1001 should not get its sessionID reset

* Reset sessionID when close code is 1000 or 4006
2019-04-17 14:32:57 +01:00
izexi
39fd8fd645 fix(typings): remove duplicated Guild#defaultRole (#3211) 2019-04-16 22:14:01 +02:00
izexi
0b1176d9a1 chore(typings): declaring explicit nullable returns (#3134)
* strict nullable & WebSocketManager private typings

* missing semicolon

* kyra suggestion #1

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* kyra suggestion #2&3

* space's requested changes

* space's requested change

* strict nullable & WebSocketManager private typings

missing semicolon

kyra suggestion #1

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

kyra suggestion #2&3

space's requested changes

space's requested change

* resolve conflicts

* deflate
2019-04-15 21:01:39 +02:00
MoreThanTom
52bc5b0170 feat(MessageEmbed): resolve color in embed constructor (#2912)
* Resolve color in embed constructor

* Use ColorResolvable type for color parameter

* docs(MessageEmbed): color property is still a number
2019-04-15 20:46:59 +02:00
Vlad Frangu
eb537b6f48 docs(WebSocketShard): mark non-nullable parameters as non-nullable (#3209)
* docs: Imagine having an optional nullable param

* docs: Another one
2019-04-15 20:17:27 +02:00
izexi
d9a053df67 docs(Presence): add ClientPresenceStatus typedef (#3208) 2019-04-15 14:41:37 +02:00
izexi
3cd224dc76 docs(Collection): fix findKey jsdoc (#3204) 2019-04-14 15:49:32 +02:00
danielnewell
2af101efbb docs(faq): add a link to the guide, restructure a bit (#3082)
* Update faq.md

added link to guide

* docs(faq): link documentation as per suggestion
2019-04-14 15:47:52 +02:00
Isabella
cbb9b14950 test: add Webhook(Client) testing file (#2855)
* test: add WebhookClient testing file

* webhooks cant edit messages, silly

* add more webhook types as requested

* fix typo

* eslint matters

* fix(webhooktests): add 'use strict', remove embed: tests
2019-04-14 15:27:59 +02:00
izexi
520810d484 feat(Util): add YELLOW to ColorResolvable (#3182) 2019-04-14 14:58:33 +02:00
SpaceEEC
ca43919642 docs: document constructors of extendible structures (#3160)
* docs: document constructors of extendible structures

* docs(ClientPresence): document default value for data parameter

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* docs(Presence): document default value for data parameter

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

* docs(DMChannel): capitalize DM in the constructor doc
2019-04-14 14:50:55 +02:00
izexi
5d10585af8 docs(Presence): add missing descriptions to clientStatus (#3127)
* add description on jsdocs for User.clientStatus

* Update src/structures/Presence.js

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/Presence.js

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* Update src/structures/Presence.js

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* update typings
2019-04-14 14:43:01 +02:00
SpaceEEC
97c196ca6a docs(GuildEmoji): add @ name to requiresColons and managed properties 2019-04-13 19:32:43 +02:00
thomasxd24
8da141637c fix end method in VoiceBroadcast (#3194)
* fix end method in VoiceBroadcast

this.client is a ClientVoiceManager and thus its this.client.broadcasts  instead of this.client.voice.broascasts

* revert the voicebroadcast and pass this.client at clientvoice

* passed this.client
2019-04-11 21:34:12 +01:00
izexi
62cba2e148 docs(GuildChannel): fix setPosition's reason type (#3199) 2019-04-11 10:10:31 +02:00
anandre
266ac1c659 docs(Role): fix setPosition's reason type (#3198) 2019-04-10 21:40:22 +02:00
Reseq64
6be5051f92 typo(RequestHandler): fix spelling of 'requests' (#3196)
Removed the additional "s" to "requessts"
2019-04-10 17:07:50 +02:00
Vlad Frangu
89e27e5071 src: Make broadcasts work again (#3190) 2019-04-08 17:29:19 +01:00
SpaceEEC
f479afca82 src: Fix TypeError (#3187) 2019-04-08 14:21:48 +02:00
Vlad Frangu
70d4b4455b refactor(ClientVoiceManager): make public, remove Client#voiceConnections (#3186)
* docs: make voice public

* typings: Update typings to match the docs

* typings: ClientVoiceManager is nullable in Client

Co-Authored-By: vladfrangu <kingdgrizzle@gmail.com>

* typings: Mark client as readonly

Co-Authored-By: vladfrangu <kingdgrizzle@gmail.com>

* src: Make the client readonly

* src: Remove Client#voiceConnections getter in favor of ClientVoiceManager#connections
2019-04-08 14:20:53 +02:00
SpaceEEC
923c945b4b fix(Guild): sort roles with the same position in the correct order (#3184) 2019-04-08 14:06:50 +02:00
izexi
152d2e88bd refactor(WebSocket): utilize URLSearchParams (#3185)
* replace querystring with URLSearchParams

* looks a bit nicer using urlSearchParams.set(...)
2019-04-08 14:06:23 +02:00
Vlad Frangu
982f48ce6a src: Fix TypeError 2019-04-07 10:57:11 +03:00
SpaceEEC
00eb7e325a fix(ApiRequest): filter out null query values
Fixes #3183
2019-04-05 16:32:50 +02:00
SpaceEEC
bfab203934 fix(ShardingManager): do not spawn the last shard early
An off-by-one error resulted in the last shard getting the delay of the second last one.
Closes #3181
2019-04-05 14:46:25 +02:00
bdistin
5e9bd786d1 refactor(APIRequest): utilize URLSearchParams (#3180)
* utilize URLSearchParams

* options.query can be undefined/null

* oops

* remembered what I intended
2019-04-05 11:32:19 +02:00
izexi
c078682722 feat(Webhook): add url getter (#3178)
* add Webhook#url

* set typing as readonly

* suggested change

* another one
2019-04-05 11:09:58 +02:00
bdistin
bb92289e45 fix: remove GuildChannel fallback, and remove GuildChannel as extendable (#3165)
* remake pr

* typings
2019-04-03 23:02:19 +02:00
SpaceEEC
089f65fd2a fix(RequestHandler): pass HTTPError pass path instead of route as path 2019-04-03 22:45:51 +02:00
SpaceEEC
32a432f4a5 cleanup(ShardClientUtil): rename id to ids 2019-04-01 13:46:27 +02:00
Vlad Frangu
3f5161eb76 fix: Internal Sharding, this time fixed™ (#3140)
* src: WIP Internal Sharding refactor

* src: Refactor unavailable guild check
Co-Authored-By: kyranet <kyradiscord@gmail.com>

* src: More WIP Code
F in the chat to the old manager

* src: It should work but Discord says no.
Seriously why is this not working!

* fix: Inflator causing issues

* src: Finishing touches and typings

* misc: Proper debug message

* fix: Making things hidden needs writable: true as well

* fix: Sharding allowing multiple of the same shard, negative shards or strings

* fix: Again... edge cases
I love you guys .w.

* misc: Touchups

* misc: Better error?

* docs: Typo

* typings: Requested changes

* src: Requested changes

* src: Fix issues, validate provided shard options and more

* src: Forgot to remove the listener

* lint: eslint complaining

* fix: Setting shardCount to auto crashing the process

* misc: Requested changes

* typings: Correct typings for shardCount client option

* typings: Add invalidSession event to the shard and correct typings

* src: Minor docs adjustements, and code consistency between setHelloTimeout and setHeartbeatTimeout

* src: Don't block reconnect while creating shards
Might fix silent disconnects *again*

* src: Prevent reconnect from running if the Manager isn't READY
That way, if a shard dies while we're still spawning, it won't cause issues

* fix: Retry to reconnect if there's a network error going on.
The manager *should* keep reconnecting unless the token is invalid

* src: Enhance onClose handler for shards in the manager
- If the close code is between 1000 and 2000 (inclusive), you cannot resume
I tested this locally
- If there's a session ID still present, immediately try to resume
Faster resumes :papaBless:
Otherwise, the invalid session event will trigger and it'll handle accordingly

I swear if I see a SINGULAR Silent DC I'm yeeting

* src: Fix error check

* src: Make sure message exists on the error

* src: Used the wrong property for the shardQueue

* src: Make the hello timeout be made by the client
god help

* docs: Correct docs for WSEvents

* misc: Remove old events from the Events constant

* src: Throw the HTTP error if we don't get a 401

* typings: Can't forget about them

* src: Implement some more fail safes just in case
Seriously, better safe than sorry! Gotta failproof it completely
2019-04-01 09:43:45 +02:00
Ryan Munro
4b6e8fcab5 typings(Collection): add missing thisArg to partition (#3167) 2019-04-01 09:36:03 +02:00
Ryan Munro
831f988fe2 typings(Collection): add typings for partition (#3166) 2019-04-01 09:35:17 +02:00
izexi
5cd6d8d380 feat(Guild): add fetchBan and withReasons to fetchBans (#3170)
* add Guild#fetchBan() & backport BanInfo

* and the typings

* requested changes

* typings overloads

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>

* nullable reason typings

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2019-04-01 09:07:52 +02:00
Schuyler Cebulskie
04fa56d0c0 Improve structure extension errors 2019-03-24 16:45:34 -04:00
Amish Shah
b74a4356dd fix lint errors 2019-03-23 12:54:22 +00:00
Amish Shah
6adb0a6609 voice: add ability to delete broadcasts 2019-03-23 12:52:18 +00:00
Amish Shah
9a092b6e57 voice: rename createVoiceBroadcast to createBroadcast 2019-03-23 12:37:55 +00:00
Amish Shah
c8225631c9 voice: move broadcasts to client.voice 2019-03-23 12:36:53 +00:00
Amish Shah
3df56540e2 voice: add documentation to VoiceBroadcast 2019-03-23 12:22:55 +00:00
Amish Shah
745e18b823 fix #3150: can now create dispatcher with 0 volume 2019-03-22 12:43:51 +00:00
izexi
9b2bf03ff6 feat(MessageStore): add cache parameter to fetchPinned() (#3154)
* add cache param to MessageStore#fetchPinned()

* typings for cache param

* set cache to true by default
2019-03-19 20:35:58 +01:00
izexi
2341d13615 fix: messageReactionRemove not emitting for partial messages (#3125) 2019-03-19 20:32:11 +01:00
SpaceEEC
e62833b5e1 docs: mark getters as @ readonly 2019-03-19 19:59:45 +01:00
Ryan Munro
df1889ab49 cleanup(Guild): removed fetchAuditLogs' "after" option (#3142)
* Removed code and documentation for Guild.fetchAuditLogs "after" option

* Also removed the option from typings
2019-03-12 19:14:32 +01:00
bdistin
1673b6f8f5 fix(APIMessage): edit shouldn't remove content (#3129)
* edit shouldn't remove content

If undefined is passed to the api, content isn't removed in such a case where you are only editing the embed.

* fix a related doc string

* update typings

* requested changes
2019-03-08 17:57:59 +01:00
Souji
be2f78851f docs/typings: RateLimitInfo#limit instead of requestLimit (#3132)
* fix doc for ratelimit data, fixes #3131

* adapt typings

* typings: unindent #region comments
2019-03-07 16:34:23 +01:00
Antonio Román
132788937a src: add missing events in constants (#3124)
* src: Add missing events in constants

* fix: Restore 'use strict';
2019-03-05 17:18:11 +01:00
Kamran Mackey
1207c243d1 typings(Guild): add missing defaultRole property (#3126)
* [typings] Fix missing defaultRole property under Guild.

Signed-off-by: Kamran Mackey <kamranm1200@gmail.com>

* [typings] Added missing readonly identifier.

Signed-off-by: Kamran Mackey <kamranm1200@gmail.com>
2019-03-04 20:32:15 +01:00
SpaceEEC
579283dfe9 fix(Role): proper undefined check for data.permission when editing 2019-03-02 21:58:40 +01:00
Amish Shah
6e761eb030 fix typo 2019-02-26 13:10:39 +00:00
SpaceEEC
32ad56a562 docs(Guild): update createChannel examples to not use deprecated overload 2019-02-25 11:09:46 +01:00
Cam Cope
f61c044b26 Mark peer dependencies as optional (#3066) 2019-02-24 08:43:42 +00:00
bdistin
fe5563e158 refactor(User): avoid invoking dmChannel getter more than once per method (#3108)
also refactors to async methods
2019-02-24 09:37:10 +01:00
Linn Dahlgren
7006f00ae4 feat(MessageEmbed): add missing proxyURL property to video (#3109)
* Added missing property to MessageEmbed.video

* Updated typings for MessageEmbed.video
2019-02-24 09:27:57 +01:00
Kyra
bc0a761e22 typings: Convert types to interfaces where applicable (#3068) 2019-02-23 22:14:09 -06:00
Linn Dahlgren
4d3f76656a docs(MessageEmbed): add missing type value (#3106) 2019-02-23 10:05:04 +01:00
Amish Shah
73be952406 use official release of prism 2019-02-21 11:56:46 +00:00
Amish Shah
efbbfbcec6 fix #3102 2019-02-20 19:15:33 +00:00
Amish Shah
6aa792f9ab voice: cleanup internals whether end() or destroy() is called 2019-02-19 13:16:48 +00:00
Amish Shah
4009986bc8 voice: destroy opus 2019-02-17 21:48:47 +00:00
Amish Shah
0564c5c777 voice: update prism 2019-02-14 16:57:26 +00:00
SpaceEEC
4289b18ab2 docs(GuildMember): add missing @name to document user property
Fixes #3090
2019-02-14 11:19:05 +01:00
Amish Shah
5c3f5d7048 Partials (#3070)
* Remove GroupDMChannels

they sparked no joy

* Start partials for message deletion

* MessageUpdate partials

* Add partials as an opt-in client option

* Add fetch() to Message

* Message.author should never be undefined

* Fix channels being the wrong type

* Allow fetching channels

* Refactor and add reaction add partials

* Reaction remove partials

* Check for emoji first

* fix message fetching

janky

* User partials in audit logs

* refactor overwrite code

* guild member partials

* partials as a whitelist

* document GuildMember#fetch

* fix: check whether a structure is a partial, not whether cache is true

* typings: Updated for latest commit (#3075)

* partials: fix messageUpdate behaviour (now "old" message can be partial)

* partials: add warnings and docs

* partials: add partials to index.yml

* partials: tighten "partial" definitions

* partials: fix embed-only messages counting as partials
2019-02-13 17:39:39 +00:00
Amish Shah
8910fed729 voice: debug UDP (#3044) 2019-02-12 16:29:11 +00:00
SpaceEEC
45a17e7ebd fix(Emoji): reject explicit error when MANAGE_EMOJI permissions are missing (#3063) 2019-02-12 10:16:23 +01:00
SpaceEEC
49e8bd9edd feat(RichEmbed): add timestamp support for setTimestamp (#3061) 2019-02-12 10:15:37 +01:00
SpaceEEC
1618829cc6 fix(Util): splitMessage throws an error if a chunk is too large (#3060) 2019-02-12 10:14:49 +01:00
SpaceEEC
a0ff72b556 fix(GuildMember): add explicit channel resolve error to member edit (#3059) 2019-02-12 10:13:37 +01:00
SpaceEEC
7bc2e231cf feat(Guild): add position to createChannel's implementation (#3058) 2019-02-12 10:12:25 +01:00
SpaceEEC
890b1be714 feat(RichEmbed): add length getter (#3057) 2019-02-12 10:11:44 +01:00
SpaceEEC
a2a0c05102 feat(Presence): add clientStatus (#3056) 2019-02-12 10:10:33 +01:00
Kyra
5c19ad7252 cleanup: Error messages cleanup (#3079)
Removed keys that return zero occurrences in the library's source code
2019-02-12 08:13:15 +00:00
Kyra
0c7a618f10 cleanup: remove unused members of classes (#3078)
* cleanup: Remove unused members of classes

* typings: Remove hit from Message
2019-02-11 20:33:13 +01:00
Amish Shah
c362ba0dd5 voice: more debug 2019-02-11 18:37:33 +00:00
Amish Shah
fe51b4e89b voice: more debug information, correctly listen to vws 2019-02-11 18:28:37 +00:00
Amish Shah
375706beac voice: replace self.xyz events 2019-02-11 18:03:35 +00:00
Amish Shah
810b5a5f71 voice: more debug info 2019-02-11 17:57:56 +00:00
Amish Shah
283fc54ce4 More debug information 2019-02-11 17:39:19 +00:00
Amish Shah
a705edfd0d voice: more debug information 2019-02-11 17:22:17 +00:00
Kyra
ab55acffdb webpack: Fix module warning when building (#3076)
Warning:
```
WARNING in ./src/client/Client.js
Module not found: Error: Can't resolve 'worker_threads' in 'D:\Repositories\discordjs\discord.js\src\client'
 @ ./src/client/Client.js
 @ ./src/index.js
```
2019-02-11 16:29:20 +00:00
Kyra
0c5b9c6870 chore(deps): Updated all required, peer, and development dependencies (#3073)
* chore(deps): Updated all required, peer, and development dependencies

And engines.node to require 10

* chore(peerDeps): Updated uws to 11.149.1

Clarified my doubts with iCrawl
2019-02-11 07:41:37 +00:00
Amish Shah
aab3523fb5 voice: more debug information
#3074, #2979, #3044
2019-02-10 20:18:08 +00:00
Vlad Frangu
793341dbb4 fix: Sharding issues, silent disconnects and code cleanup (#2976)
* fix: Sharding bugs, silent disconnects and cleanup code

* typings

* fix: Destroy connecting with close code different from 1000
Per `If a client does not receive a heartbeat ack between its attempts at sending heartbeats, it should immediately terminate the connection with a non-1000 close code, reconnect, and attempt to resume.`

* misc: Wait x ms before reconnecting
Per https://discordapp.com/developers/docs/topics/gateway#resuming

* docs

* nit: docs

* misc: Prevent multiple calls to WebSocketManager#destroy

* fix: Implement destroying if you reset the token

* misc: Clear the WS packet queue on WebSocketShard#destroy
You can't send those packets anywhere anymore, so no point in keeping them

* fix: Handle session limits when reconnecting a full shard, cleanup

* misc: No need to create a new shard instance

* fix: closeSequence being null, thus emitting null on Client#resumed

* misc: Remove GUILD_SYNC Gateway handler and add missing dot to string

* misc: Close WS with code 4000 if we didn't get a heartbeat in time

As said in the Discord API server

* fix: Handle ready emitting in onPacket
Doesn't allow broken packets

* misc: Close the connection if Discord asks for a reconnect
Prevents double triggers

* testing: Prevent multiple reconnect attempts on a shard

Should fix some issues some people have had.

* fix: Prevent multiple reconnect calls on the shard, re-use conn to identify, remove reconnect function
Note: Closing the WS with 1000 makes the session invalid

* misc: Forgot to remove 2 unneeded setters

* docs: Wrong param docstring for WebSocketShard#destroy

* misc: Set status to reconnecting after destroying

* misc: Close connection with code 1000 on session invalidated
Allows us to cleanup the shard and do a full reconnect
Also remove identify wait delay, not used anywhere

* fix: Fix zlib crash on node
And with that, the PR is done!

* misc: Implement a reconnect queue
And that is all there was to be done in this PR.
Shards now queue up for a reconnect

* nit: Debug the queue after destroying

* docs: Make the invalidated event clearer

* lint: I'm good at my job

* docs

* docs: Make description for isReconnectingShards accurate
*can I stop finding issues, this PR is meant to be done*

* misc: Remove shard from bind params

* misc: Code re-ordering and cleanup
Resumes do not need to be queued up, as they do not count to the identify limit, and after some testing, they don't have the 5 second delay required, like in identify

* fix: Issues with token regeneration and shards not properly handling them
We close the ws connection with code 1000 if we get an invalid session payload,
that way we can queue the reconnects and handle any issues

* misc: Remove useless delays on session invalidated
They get handled by the rest of the code already

* lint

* misc: reset the sequence on Shard#destroy
This especially is a problem if you need to re-identify, as the sequence doesn't get set to the current one,
causing the sequence to be wrong

* fix: GitHub rebase and minor tweak
* Implement a 15 second timeout if shards don't connect till then
Should prevent shards that never reconnect

* revert: Make WebSocketShard#send and WebSocketManager#broadcast public

* typings: Set type to void instead of undefined

* docs: Requested Changes
2019-02-10 16:28:03 +00:00
SpaceEEC
7324a993ed fix: ensure VIEW_CHANNEL permissions before trying to join (#3046)
* fix: ensure VIEW_CHANNEL permissions before joining

* nit(GuildChannel): remove the redundant truthy check
2019-02-10 15:21:59 +00:00
Atlas
ff95e587cb Better wording (#3032) 2019-02-09 23:53:47 +00:00
SpaceEEC
5272cec6c8 feat(Util): add WHITE as color resolvable (#3062) 2019-02-09 23:52:38 +00:00
Kyra
d057a5040c ci: Test in Node.js 10 and 11, deploy with Node.js 10 (#3069) 2019-02-09 23:51:23 +00:00
Kyra
9449f8df8f cleanup(GuildMember{RoleStore}): Rewrite to async/await (#3072)
- Fixed a bug where `GuildMemberRoleStore#{add,remove}` would create a rejected promise inside a promise, instead of rejecting the first one.
- Fixed a bug where `GuildMember#edit` with a specified unknown channel would throw synchronously, instead of rejecting asynchronously.
2019-02-09 17:20:10 +00:00
Kyra
c432591113 feat(RoleStore, ChannelStore): fetch() method (#3071)
* feat({Role,Channel}Store): fetch method

* docs: Add usage examples to the new methods

* misc: Add note of why we are fetching all roles even for a single one
2019-02-09 15:07:31 +00:00
Kyra
359ddaf1df feat(Constants): add error code 50020 (#2953)
* feat(Constants): Add error code 50020

Which is throw when using the vanity-url endpoint: https://github.com/discordapp/discord-api-docs/pull/748/

* docs: Document the new code
2019-02-06 22:09:00 +01:00
Lucas Kellar
8b602ebed4 typings(SnowflakeUtil): add optional "timestamp" parameter to generate (#2998) 2019-02-06 19:14:52 +01:00
Kyra
ae7269088b typings(ShardClientUtil): fix id property type (#3054)
Ref: d98d464d74/src/sharding/ShardClientUtil.js (L50)
2019-02-06 18:15:05 +01:00
Amish Shah
f826c9c75e voice: workaround for receiving audio
(#2929 and discordapp/discord-api-docs#808)
2019-02-05 10:26:16 +00:00
Kyra
d98d464d74 typings(GuildCreateChannelOptions): added missing properties (#3052)
* typings(GuildCreateChannelOptions): Added missing properties

* typings: Added `GuildChannelCloneOptions`
2019-02-04 17:57:13 +01:00
Kyra
dd8ba00af4 misc(index): export HTTPError class (#3051) 2019-02-04 16:44:21 +01:00
Isabella
75e264da57 feat: Presence#clientStatus (#2997)
* feat: Presence#clientStatus

* fix Presence#equals check

* fix typings

* vlad changes

* presence consistency docs

* fix docs

* fix big docs fail
2019-02-02 20:29:47 +01:00
Rattmann (fallen)
1db78994dd feat: MessageEmbed#length (#3003)
* add MessageEmbed#length

* update typings (+MessageEmbed#length)

* eslint: L181 (max line length), L183 (missing semi)

* eslint: L181 (trailing space)
2019-02-02 20:29:10 +01:00
SpaceEEC
db3ae0159b docs(Structures): note about extending prior to instantiating client (#2884) 2019-02-02 20:28:24 +01:00
Marcel Menzel
f2ed93c08a fix(WebSocketShard): report correct resumed event count (#3019)
This PR attempts to fix the reported resumed event count in the debug output (where it is always displayed only as 1 event replayed) and in the emitted `resumed` event, where it passed the current sequence instead of passing the actual replayed event count (which was an utopic high number for smaller bots on resume).
2019-02-02 11:28:45 +01:00
Kyra
2dcdc798ac typings: add missing ImageSize numbers (#3045)
To match the JS typedef: https://discord.js.org/#/docs/main/master/typedef/ImageURLOptions
2019-02-02 10:42:13 +01:00
Anthony Collier
3dff5058f0 docs(Examples): fix usage of removed overload of Collection#find (#3027) 2019-01-21 17:22:24 +01:00
SpaceEEC
73aaab5106 fix(Guild): ignore voice states referencing an invalid channel
This was causing an uncaught exception on startup (or whenever receiving such a payload) which is crashing the process.
2019-01-17 11:34:10 +01:00
izexi
3b7b282b69 docs(Client): add missing example tag and closing parenthesis (#3024) 2019-01-17 09:58:04 +01:00
Darqam
5ed2a95856 docs(Client): add missing parenthesis in fetchInvite example (#3023)
This is already fixed in master, resolves #3022
2019-01-16 19:17:19 +01:00
Isabella
8230255c68 fix(ShardClientUtil#id): erroneously reporting as an array 2019-01-15 01:45:29 -06:00
SpaceEEC
28db527370 docs(Guild): use 'updated' variable in example for setRegion 2019-01-10 16:54:02 +01:00
SpaceEEC
46fd7b093c docs(Guild): use AuditLogAction for fetchAuditLogs' type option 2019-01-10 13:05:33 +01:00
SpaceEEC
17ca83663f typings(TextBasedChannel): fix create(Message)Collector's options type 2019-01-06 17:51:27 +01:00
SpaceEEC
9d83516918 typings(Guild): fix typos in method names
Fixes #3009
2018-12-31 18:21:22 +01:00
SpaceEEC
89a9b93cdc docs(Webhook): add mising '@name' to Webhook#token's docstring 2018-12-30 12:56:33 +01:00
SpaceEEC
840d22f892 docs(Webhook): add mising '@name' to Webhook#token's docstring 2018-12-30 12:52:33 +01:00
Amish Shah
0bde9ca2c5 voice: set seek parameter before input (#2993) 2018-12-27 18:05:54 +00:00
Kyra
8a76cc5c72 typings(TextBasedChannel): add Snowflake[] overload to bulkDelete (#3001)
* typings: Add `string[]` overload to bulkDelete

* misc: Requested changes
2018-12-25 22:00:46 +01:00
Drahcirius
7186c91063 fix(TextBasedChannel): added missing lastMessage functionality in textchannels (#2999) 2018-12-23 22:16:50 -06:00
Lucas Kellar
8286d1a0fc typings(SnowflakeUtil): add optional "timestamp" parameter to generate (#2998) 2018-12-23 23:16:28 +01:00
SpaceEEC
21ec03140f feat(GuildChannelStore): add support for create to accept a position (#2965) 2018-12-22 08:50:33 +01:00
Will Nelson
5cbdf38028 fix(WebSocketShard): add websocket send error handling (#2981)
* websocket send error handling

* fix: emit only when error is present

* refactor: use an if instead
2018-12-22 08:49:56 +01:00
izexi
2aa8e1d9c1 docs:(TextChannel): add documentation for messages and lastMessage (#2986)
* [docs] add missing docs for <TextChannel>.messages

* add missing doc for <TextChannel>.lastMessage
2018-12-22 08:25:24 +01:00
August
b5d5c699e6 fix: guildBanRemove event name (#2983)
- "Events.GUILD_BAN_REMOVEGUILD_BAN_REMOVE" -> "Events.GUILD_BAN_REMOVE"
2018-12-09 09:30:46 +01:00
Gus Caplan
42505b78c1 chore: add strict mode (#2974) 2018-12-03 15:19:10 -06:00
SpaceEEC
ecaec29380 fix(Util): throw an explicit error if a chunk exceeds the max length (#2936)
* fix(Util): throw an explicit error if a chunk exceeds the max length

* refactor(Util): consolidate both errors in splitMessage into one

* revert(Messages): do not unnecessarily change the error code

* revert(Messages): do not remove the word 'the'
2018-11-27 21:42:28 +01:00
Darqam
23a16c3a73 fix(GuildChannel): add explicit channel resolve error to member edit (#2958)
* Add explicit error to setting invalid voice channel

* restrict to guild

Co-Authored-By: Darqam <anhim2@gmail.com>

* add a more explicit error and channel type check

* bad tab
2018-11-27 21:41:34 +01:00
SpaceEEC
fd21bbb7bf docs: move event docstrings to the emitting line of code 2018-11-27 21:28:36 +01:00
Skillz4Killz
1d1b3f25e1 docs: add documentation for Client#channelCreate (#2967) 2018-11-27 21:12:25 +01:00
SpaceEEC
351f0a32bf typings(RichEmbed): add MessageEmbed as valid data in constructor
See #2970
2018-11-26 18:08:31 +01:00
SpaceEEC
a8b47a7a6c feat(GuildChannelStore): add support for create to accept a position 2018-11-23 19:46:11 +01:00
Frangu Vlad
9085138f0d fix: Sharding Issues & Cleanup (#2952)
* fix: Sharding causing constant heartbeat / identify spam

* misc: Remove wait param in connect

* misc: Wait 2.5 seconds before sending identify again if session is resumable

* misc: Remove useless destroy call

* nit: Capitalization

* fix: Identify on HELLO not connectionOpen

* misc: Add different intervals for identify after invalid session
- 2500 if we couldn't resume in time
- 5000 if we didn't have a session ID (per the docs on identify, that a client can only connect every 5 seconds)
- Otherwise, just identify again

* misc: Only clear heartbeat if shard is fully dead

Reconnect clears it otherwise

* fix: Accessing .length on a Collection
2018-11-21 13:42:37 -06:00
Crawl
377ecd73ea docs(GuildChannel): fix doc string for clone method 2018-11-20 16:42:27 +01:00
SpaceEEC
691aaef07e backport(Guild): support for rateLimitPerUser when creating a channel
PR: #2878
Commit: 8ec3b5134d
2018-11-17 17:24:48 +01:00
SpaceEEC
6aa7792097 docs(GuildChannel): add rateLimitPerUser to ChannelData typdef 2018-11-17 17:19:04 +01:00
SpaceEEC
d92ee2ff99 feat(GuildChannel): allow to set all options when cloning (#2937) 2018-11-17 15:43:04 +01:00
Charalampos Fanoulis
81ff5075e4 chore: remove user account checkbox from bug report template 2018-11-17 15:41:12 +01:00
Yukine
e793338d74 fix: ShardClientUtil#count and ShardClientUtil#id typedef (#2956) 2018-11-16 22:46:02 -06:00
Kyra
54aff3191e feat(Constants): add error code 50020 (#2953)
* feat(Constants): Add error code 50020

Which is throw when using the vanity-url endpoint: https://github.com/discordapp/discord-api-docs/pull/748/

* docs: Document the new code
2018-11-16 16:55:15 +01:00
Amish Shah
2d68e837e5 voice: fix receiver null on immediate voiceStateUpdate 2018-11-15 21:38:02 +00:00
Lewdcario
3418b5a1a2 docs: restore Client#error docs that went missing 2018-11-06 14:59:02 -06:00
Souji
980d71f307 fix:(GuilChannel): clone method not taking overwrites into account (#2932) 2018-11-06 20:01:48 +01:00
Lewdcario
6b886b0aba typings: add Guild#shard and Guild#shardID 2018-11-06 11:23:17 -06:00
Lewdcario
08002d0576 fix: Client#userUpdate receiving wrong packet 2018-11-05 18:24:50 -06:00
Lewdcario
b59c75e402 docs: add missing docstring for Client#guildDelete 2018-11-05 13:29:07 -06:00
Souji
905f1c3262 docs: add missing docstring for Client#userUpdate (#2930)
* docs: add missing docstring for Client#userUpdate

* docs: indentn't

* docs: indentn't 2
2018-11-05 17:46:47 +01:00
Lewdcario
7796cb5d05 fix: Client#raw emitting twice 2018-11-04 23:26:40 -06:00
Lewdcario
be0d1cd663 fix: Client#shards not being set properly 2018-11-04 23:25:54 -06:00
Amish Shah
b3f459091f Fix #2928 (member not being removed from voice channel after leaving guild) 2018-11-04 12:26:06 +00:00
Isabella
f3cad81f53 feat: Internal sharding (#2902)
* internal sharding

* ready event

* the square deal

* the new deal

* the second new deal

* add actual documentation

* the new freedom

* the great society

* federal intervention

* some of requested changes

* i ran out of things to call these

* destroy this

* fix: Client#uptime went missing

* fix(Client): destroy the client on login failure

This may happen duo invalid sharding config / invalid token / user requested destroy

* fix(Client): reject login promise when the client is destroyed before ready

* fix(WebSocketManager): remove redundancy in destroy method (#2491)

* typo(ErrorMessages): duo -> duo to

* typo(ErrorMessages): duo -> due

* fix: docs and options

* docs(WebSocketManager): WebSockethard -> WebSocketShard (#2502)

* fix(ClientUser): lazily load to account for extended user structure (#2501)

* docs(WebSocketShard): document class to make it visible in documentation (#2504)

* fix: WebSocketShard#reconnect

* fix: presenceUpdate & userUpdate
* presenceUpdate wasn't really being handled at all
* userUpdate handled incorrectly because as of v7 in the Discord API, it comes inside presenceUpdate

* re-add raw event

* member is now part of message create payload

* feat: Add functionality to support multiple servers with different shards (#2395)

* Added functionallity to spawn multiple sharding managers due to adding start and end shards

* Small fixes and limiting shard amount to max recommended

* Forgot a check in spawn()

* Fixed indentation

* Removed optiosn object documentation for totalShards

* More fixes and a check that the startShard + amount doesnt go over the recommended shard amount

* fix getting max recommended

* Removed async from constructor (my fault)

* Changed start and end shard to a shardList or "auto" + fixed some brainfarts with isNaN

* Changed the loop and totalShard count calculation

* shards are actually 0 based

* Fixed a problem with the gateway and handled some range errors and type errors

* Changed Number.isNan to isNaN and changed a few Integer checks to use Number.isInteger

* Added check if shardList contains smth greater than totalShards; made spawn use totalShards again; shardList will be ignored and rebuild if totalShards is 'auto'; fixed docs

* ShardingManager#spawn now uses a for..of loop; fixed the if statement inside the new for..of loop to still work as intended; made the totalShards be set to a new amount if smth manual is put into ShardingManager#spawn just like before; Fixed some spelling

* internal sharding

* ready event

* the square deal

* the new deal

* the second new deal

* add actual documentation

* the new freedom

* the great society

* federal intervention

* some of requested changes

* i ran out of things to call these

* destroy this

* fix: Client#uptime went missing

* fix(Client): destroy the client on login failure

This may happen duo invalid sharding config / invalid token / user requested destroy

* fix(Client): reject login promise when the client is destroyed before ready

* fix(WebSocketManager): remove redundancy in destroy method (#2491)

* typo(ErrorMessages): duo -> duo to

* typo(ErrorMessages): duo -> due

* fix: docs and options

* docs(WebSocketManager): WebSockethard -> WebSocketShard (#2502)

* fix(ClientUser): lazily load to account for extended user structure (#2501)

* docs(WebSocketShard): document class to make it visible in documentation (#2504)

* fix: WebSocketShard#reconnect

* fix: presenceUpdate & userUpdate
* presenceUpdate wasn't really being handled at all
* userUpdate handled incorrectly because as of v7 in the Discord API, it comes inside presenceUpdate

* Internal Sharding adaptation

Adapted to internal sharding
Fixed a bug where non ready invalidated sessions wouldnt respawn

* Fixed shardCount not retrieving

* Fixing style

removed unnecessary parenthesis

* Fixing and rebasing

lets hope i didnt dun hecklered it

* Fixing my own retardation

* Thanks git rebase

* fix: assigning member in message create payload

* fix: resumes

* fix: IS wont give up reconnecting now

* docs: add missing docs mostly

* fix: found lost methods

* fix: WebSocketManager#broadcast check if shard exists

* fix: ShardClientUtil#id returning undefined

* feat: handle new session rate limits (#2796)

* feat: handle new session rate limits

* i have no idea what i was doing last night

* fix if statement weirdness

* fix: re-add presence parsing from ClientOptions (#2893)

* resolve conflicts

* typings: missing typings

* re-add missing linter rule

* fix: replacing ClientUser wrongly

* address unecessary performance waste

* docs: missing disconnect event

* fix(typings): Fix 2 issues with typings (#2909)

* (Typings) Update typings to reflect current ClientOptions

* fix(Typings) fixes a bug with Websockets and DOM Types

* fix travis

* feat: allow setting presence per shard

* add WebSocketManager#shardX events

* adjust typings, docs and performance issues

* readjust shard events, now provide shardId parameter instead

* fix: ready event should check shardCount, not actualShardCount

* fix: re-add replayed parameter of Client#resume

* fix(Sharding): fixes several things in Internal Sharding (#2914)

* fix(Sharding) fixes several things in Internal Sharding

* add default value for shards property

* better implement checking for shards array

* fix travis & some casing

* split shard count into 2 words

* update to latest Internal Sharding, fix requested changes

* make sure totalShardCount is a number

* fix comment

* fix small typo

* dynamically set totalShardCount if either shards or shardCount is provided

* consistency: rename shardID to shardId

* remove Client#shardIds

* fix: typo in GuildIntegrationsUpdate handler

* fix: incorrect packet data being passed in some events (#2919)

* fix: edgecase of ShardingManager and totalShardCount (#2918)

* fix: Client#userUpdate being passed wrong parameter
and fix a potential edgecase of returning null in ClientUser#edit from this event

* fix consistency and typings issues

* consistency: shardId instances renamed to shardID

* typings: fix typings regarding WebSocket

* style(.eslintrc): remove additional whitespace

* fix(Client): remove ondisconnect handler on timeout

* docs(BaseClient): fix typo of Immediate

* nitpick: typings, private fields and methods

* typo: improve grammar a bit

* fix: error assigning client in WebSocketManager

* typo: actually spell milliseconds properly
2018-11-03 13:21:23 -05:00
Schuyler Cebulskie
18f065867c Fix #2924 with a bandage (Node typings not updated) 2018-11-03 13:09:56 -04:00
Schuyler Cebulskie
ab3a439198 Add worker-based sharding to the ShardingManager (#2908)
* Add worker-based sharding mode to ShardingManager

* Fix ClientShardUtil mode

* Fix worker not being cleared on shard death

* Update docs and typings

* Clean up Client sharding logic a bit

* Add info about requirements for worker mode
2018-10-29 15:02:36 -04:00
Schuyler Cebulskie
b759fc415e Slightly simplify logic in APIMessage.transformOptions 2018-10-27 15:28:05 -04:00
SpaceEEC
01476de582 fix(VoiceConnection): compare new speaking to old to avoid TypeError 2018-10-20 12:12:21 +02:00
sillyfrog
2ba00038d1 fix(VoiceConnection): use Speaking#has to fire _stoppedSpeaking (#2896)
* Use match on speaking bitmask to fire _stoppedSpeaking

* Use constants and correct matching

* Correctly do a not check
2018-10-19 18:15:01 +02:00
Lewdcario
e189c1b728 fix: revert #2744
see #2848, fixes issues with stack not displaying correctly
2018-10-15 02:08:49 -05:00
Lewdcario
16076124b2 fix(Client#voiceStateUpdate): newState is guaranteed 2018-10-14 13:58:34 -05:00
Isabella
183ba25faf fix: emit voiceStateUpdate on guildMemberRemove (#2892)
* fix: emit voiceStateUpdate on guildMemberRemove

* apparently i am blind

* typings
2018-10-14 12:44:14 -05:00
Isabella
950abd4ac3 fix: revert #2768 (#2848)
* fix: revert #2768

* fix merge
2018-10-14 11:44:02 -05:00
Lewdcario
9cf50d05f2 fix(typings): ReactionUserStore#fetch returns a Collection
fixes #2895
2018-10-13 20:09:19 -05:00
SpaceEEC
73b9b0e62b fix(Shard): use DISCORD_TOKEN instead of CLIENT_TOKEN, see #2843 2018-10-13 15:20:56 +02:00
Amish Shah
2e7094f9ea voice: fix disconnect without receiver edge case 2018-10-11 23:02:59 +01:00
SpaceEEC
4491b7b42a typings(MessageEmbed): add spliceField and static checkField methods 2018-10-10 11:30:26 +02:00
Souji
fd25d19c9c docs(ClientUser): fix example for setActivity method (#2880) 2018-10-10 10:30:23 +02:00
Souji
78c4be52c6 docs(Collection): clarify example for tap method (#2881)
* docs: clarify example for Collection#tap

* docs: wording improvement
2018-10-10 10:29:53 +02:00
SpaceEEC
6e5f088e44 refactor: consistently use permissionOverwrites over overwrites (#2886) 2018-10-10 10:25:00 +02:00
SpaceEEC
7ea88adeca backport(Guild): support for createChannel with options object (#2888) 2018-10-10 10:05:32 +02:00
SpaceEEC
71c04a303a feat(Emoji): move createdAt and createdTimestamp getters from GuildEmoji (#2872) 2018-10-10 10:01:23 +02:00
SpaceEEC
ea3e575546 backport(TextBasedChannel): add lastPinTimestamp and lastPinAt (#2870)
And clarify Client#channelPinsUpdate's 'time' parameter.
2018-10-10 10:01:04 +02:00
Will Nelson
1ee417cd65 featt(ClientUser): allow options as first parameter to setActivity (#2890) 2018-10-10 09:59:16 +02:00
Dim
8ec3b5134d feat(GuildChannelStore): support for create with rateLimitPerUser (#2878)
* change GuildChannelStore#create

* document rateLimitPerUser

* update typings
2018-10-10 09:58:31 +02:00
bdistin
8feb874586 feat(MessageEmbed): add spliceField method (#2857)
* Add spliceField and refactor to prevent code dupe

* String() was for a falsy check, fixed

* requested: remove embed field count checks
2018-10-10 09:57:56 +02:00
Isabella
1fe36087d4 feat(MessageEmbed): allow setTimestamp to take a timestamp (#2875)
* feat: allow MessageEmbed#setTimestamp to take a timestamp

* fix the dumb i did
2018-10-10 09:57:13 +02:00
SpaceEEC
27d2ce7baf typings(Collection): each return Collection<K, V>, not void 2018-10-05 11:37:49 +02:00
Amish Shah
00a62a93e4 voice: catch errors before connection is ready 2018-10-04 20:57:52 +01:00
SpaceEEC
fcf4745a43 typings: fix lint script and linter errors 2018-10-04 19:29:12 +02:00
SpaceEEC
b92f8d9c06 docs(Game): document possible values for type property
See #2865
2018-10-04 13:31:26 +02:00
SpaceEEC
6b810b2331 fix(ClientPresence): use possibly extended constructor from structures 2018-10-04 12:36:25 +02:00
SpaceEEC
1428967238 docs(Integration): document Integration class 2018-10-04 11:01:21 +02:00
SpaceEEC
c6201ee41b backport(Guild): add fetchVanityCode (#2871) 2018-10-03 17:31:20 -05:00
Isabella
1e85887229 backport: rateLimitPerUser (#2874) 2018-10-03 17:21:26 -05:00
SpaceEEC
e0f522a745 backport(ClientOptions): add retryLimit (#2869) 2018-10-03 17:20:53 -05:00
Daniel
62e7e26310 Add white to colours (#2853)
* add white to colorresolvable typedef

* add colour white
2018-10-01 14:02:50 +02:00
bdistin
96a0655609 refactor(WebhookClient): make token property non-enumerable (#2861)
* make WebhookClient#token non-enumerable

parity with Client to add the barest protection against accidental exposure

* requested change
2018-10-01 12:43:08 +02:00
bdistin
d8c97be142 docs: fix typos (#2868) 2018-10-01 12:38:36 +02:00
SpaceEEC
21999fa4a0 fix(typings): fix compilation with 'strict' enabled (#2845) 2018-09-30 11:30:07 +02:00
Kyra
d4c0bb2a0d feat(TextChannel): RateLimitPerUser (#2811)
* feat: Add TextChannel#rateLimitPerUser
Rename parameter in TextChannel#setRateLimitPerUser
feat: Add `rateLimitPerUser` param to ChannelData
fix: eslint

* docs: Updated typings

* fix: Requested changes

* fix: rateLimitPerUser being undefined when 0

When `rate_limit_per_user` is 0, the gateway does not send it (but REST does). When this is set to a non-zero number, this property starts to exist. Otherwise this will be `0`. Adding `|| 0` should do the trick changing `undefined` to `0`.

* fix: eslint
2018-09-29 16:02:49 +02:00
Kyra
60ad9053a3 typings: add HTTPError class definition (#2852)
Class was introduced with #2694 

* typings: Add HTTPError class definition

* typings: Sort HTTPError's members by name
2018-09-23 22:07:19 +02:00
Shayne Hartford
32b405a5be Change default token (#2843)
* Change default token

Default `token` to `process.env.CLIENT_TOKEN` like client does.

* 2/2

* 1/2
2018-09-23 21:36:28 +02:00
Andrew Lehman
3298ea1869 docs: correct default value for SplitOptions.maxLength in Util#splitMessage (#2847) 2018-09-23 21:35:56 +02:00
SpaceEEC
0ab69c5ad4 fix(Webhook): APIMessage require should be a const 2018-09-23 17:04:22 +02:00
SpaceEEC
c0a9b08e73 fix(Webhook): APIMessage is not circular, fixes WebhookClients 2018-09-23 17:02:35 +02:00
SpaceEEC
3f44320bbe docs(MessageAttachment): redocument name property 2018-09-22 11:45:03 +02:00
Lewdcario
53420fa4e7 fix: Webhook#send not resolving content 2018-09-21 23:02:31 -05:00
bdistin
3d8207a3db refactor: comprehensive permissionOverwrites refactor (#2818)
* wip: comprehensive permissionOverwrites refactor

* PermissionOverwrites.resolve should Promise.reject()

where a promise is the expected return value

* On second thought, async rewrite to automatically reject on throw

* Fix some docs

* Fix a bug

* fix 2 more bugs

* typings: Updated for latest commit

* typings: Add missing method in GuildChannel

* typings: Add missing `| null` in PermissionOverwriteOption type

* Suggested changes
2018-09-21 12:21:51 +02:00
bdistin
6d184257b3 refactor: remove duplicate send checks (#2790)
* re-direct pr code to master

* fix Webhook send docs

* requested changes

* typings: Updated to latest commit

* requested change

* requested change
2018-09-21 10:59:58 +02:00
Crawl
8a6d029c00 build(dev-deps): update to use terser instead of uglifyjs 2018-09-19 01:20:07 +02:00
SpaceEEC
d2da771e0f docs(Client): fix syntax error in fetchInvite example 2018-09-18 11:04:54 +02:00
SpaceEEC
2cc0a31d5c typings(Message): member property is a readonly getter 2018-09-15 19:49:34 +02:00
SpaceEEC
9de3e098da docs(User): clarify what User#tag represents
Closes #2828
2018-09-10 18:11:09 +02:00
SpaceEEC
1d77d1a9b8 fix(typings): remove UserConnection, fix various constructors
Closes #2825
2018-09-10 13:41:33 +02:00
Ash
9c2924a1b4 docs(ChannelPinsUpdate): clarify time param (#2823) 2018-09-05 14:33:44 +02:00
Ash
e96a60361a feat(TextBasedChannel): add lastPinTimestamp and lastPinAt (#2813)
* add lastPinTimestamp

* typings

* use or instead of ternary
2018-09-03 09:11:52 +02:00
lipgloss
b068abb5de typings: add declaration of Message#url and MessageAttachment#size (#2821)
* add url to message typings

* also its readonly

* message attachment sizing typing
2018-09-03 08:53:20 +02:00
SpaceEEC
75745fe2ba typings(GuildChannel): permissionsFor's return value is nullable 2018-09-02 16:03:03 +02:00
SpaceEEC
ead99a53b7 fix(HTTPError): the path property should actually be the path 2018-09-02 14:57:36 +02:00
SpaceEEC
6b9dd13d43 docs/typings(GuildChannel): permissionsfor returns a nullable readonly Permissions instance 2018-09-02 13:23:39 +02:00
SpaceEEC
b1ce602e79 fix/cleanup(typings): move static properties above methods
Make BitField.FLAGS declaration less strict, allowing enums and typed dicts
2018-09-02 10:42:22 +02:00
Adam Gauthier
038b142db2 fix: emit ReactionCollector#remove when reaction is removed by collected user (#2803) 2018-09-01 05:02:30 +02:00
lipgloss
314161ab70 GuildEmoji.fetchAuthor() error handling (#2788)
* handle when client has insufficient permissions, add typing

* code review
2018-09-01 04:52:50 +02:00
Isabella
be4d6f9dc3 feat: add ClientOptions#retryLimit (#2805)
* feat: add ClientOptions#retryLimit

* hydra needs to learn how to code right

* a default would probably help

* move incrementor & update comment

* clarify docs on Infinity
2018-09-01 04:51:35 +02:00
Ash
3970c5005b cleanup: use null over undefined (#2810) 2018-09-01 04:51:11 +02:00
Crawl
641ee86105 build(peer-deps): use uws fork backport (#2782)
* build(peer-deps): uws backport

* chore: update to 149 for uws
2018-08-30 17:55:31 -05:00
Lewdcario
f75b80d96b docs: add docstring to HTTPError 2018-08-30 16:31:22 -06:00
Souji
da2d4d7230 docs: correct Guild#memberCount (#2812) 2018-08-30 00:15:05 -05:00
Kyra
c63f15c8bc cleanup(Invite): remove outdated props, properly default to null (#2807) 2018-08-29 12:41:53 +02:00
Kyra
cd58599caf fix(Guild#deleteEmoji): reject non emojis / emoji IDs (#2793)
* fix(Guild#deleteEmoji): Performing wrong checks

* fix: requested changes

`a string` -> `an id`

* fix: requested changes

`id` -> `ID`
2018-08-29 08:45:27 +02:00
Adam Gauthier
8821fd40bc cleanup: remove remaining apiRequestMethod docs and typings (#2806) 2018-08-29 08:43:28 +02:00
Kyra
b83fdbfefe docs: Added url to Invite's warning comment (#2804)
And added the [serial comma](https://en.wikipedia.org/wiki/Serial_comma)
2018-08-28 19:12:12 -05:00
Kyra
989c365ef1 fix: Better global ratelimit management (#2801)
* fix: better global ratelimit handling in RequestHandler

fix: Remove useless line

fix: Better global ratelimit management

* refactor: Changed RESTManager#globallyRateLimited to be a getter

* refactor: Remove RESTManager#globallyRateLimited getter

* docs: Updated comments to reflect latest changes
2018-08-28 18:28:21 -05:00
bdistin
f326fe67b1 fix: reactions ratelimits (#2795)
* each reaction doesn't have it's own ratelimit

* fix hard-coded reset for reacting
2018-08-28 18:25:38 -05:00
Kyra
89986ae293 backport: UNKNOWN_WEBHOOK (#2777) 2018-08-28 10:35:34 -05:00
Kyra
091b4fc214 backport: Guild#{fetchEmbed,setEmbed} (#2778)
*  backport: Guild Embeds

* fix: Added missing return

* docs: Updated typings
2018-08-28 10:33:51 -05:00
Kyra
3345c77ce2 backport: GUILD_INTEGRATIONS_UPDATE event (#2794)
* backport: Client#on{guildIntegrationsUpdate,webhookUpdate}

misc: Update Constants.WSEvents and WSEventType

backport: Add guildIntegrationsUpdate event handler

* docs: Updated typings
2018-08-28 10:25:44 -05:00
Ash
1fc84a95d0 fix(GuildChannel#lockPermissions): Properties allow and deny always returning undefined (#2800)
* fix undefined properties

* requested changes
2018-08-26 13:11:00 -05:00
lipgloss
9c2aeb733a fix: private_channels always returns an empty array on ready (#2787) 2018-08-26 13:06:00 -05:00
Kyra
58ba2c7b14 backport: Deprecate allowed/denied as #2765 (#2792) 2018-08-26 13:03:02 -05:00
Lewdcario
2e2c9c4b9a typings: clean up permissionResolvable 2018-08-26 11:55:10 -06:00
Lewdcario
bd14d5d2fa typings: add WEBHOOKS_UPDATE 2018-08-26 11:07:51 -06:00
Kyra
453098117f backport: WEBHOOKS_UPDATE event (#2779) 2018-08-26 11:59:15 -05:00
Lewdcario
93bf430fc7 fix: Guild#addMember incorrectly resolving userID 2018-08-26 09:46:55 -06:00
Amish Shah
6f62d7d816 fix: voice not throwing errors on bad stream input (#2786) 2018-08-25 19:41:07 +01:00
Kyra
469fbe2889 docs(Emoji): fix typo of the word "emoji" (#2791) 2018-08-24 18:31:43 +02:00
Crawl
9b329a457c build(peer-deps): use uws fork (#2781)
* feat: use uws fork

* chore: update to 149 for uws
2018-08-24 16:51:33 +02:00
Souji
cb08a0961a Docs: merge PermissionOverwriteOptions and OverwriteData (#2738)
* Docs: merge PermissionOverwriteOptions and OverwriteData

* fix user-member and replace eslint-disable with linebreaks

* consistency fix

* Fix: remove empty line between jsdocs and method

* Fix: allowed/denied to allow/deny to conform with recent master changes
2018-08-24 16:51:15 +02:00
Kyra
c4df02782e feat: Guild Integrations (#2760)
* feat: Guild Integrations

* feat: Guild#createIntegration

* feat: Add ws event GUILD_INTEGRATIONS_UPDATE

* docs: Add `GUILD_INTEGRATIONS_UPDATE` to WSEventType

* misc: Fixed requested change

* docs: Updated typings

* typings: Sort members by name
2018-08-24 16:03:29 +02:00
Isabella
13f46b924b refactor: clean up rate limit handling (#2694)
* refactor: clean up rate limit handling

* requested changes

* remove request mode option

* fix dupe requests

* hardcode reaction ratelimits

* suggested changes

* fix small thing

* re-add restTimeOffset

* move restTimeOffset a bit

* i swear i know english its my native language ok

* requested changes

* fix: a bit *too* pre-emptive with ratelimits, now less so

* fix: dapi error shoudl reject with path

* fix: make errors in execute catchable

* fix promise return

* rebase is hard
2018-08-24 06:29:44 +02:00
SpaceEEC
82993fbe51 fix(ClientApplication): Message#application is a partial ClientApplication 2018-08-22 19:26:57 +02:00
Kyra
911e289b55 backport: User#dmChannel perf enhancement (#2780) 2018-08-22 11:52:21 +02:00
Kyra
28d4f74b65 misc: update ClientApplication for the current API (#2767)
* misc: Update ClientApplication for the current API

* cleanup: ClientApplication#fetchAssets, removed createAsset

* Major cleanup time

* Merge to kyra's branch

* docs: Updated typings

* fix: re-add ClientApplication#{cover,coverImage()}

* typings(ClientApplication): move coverImage declaration up
2018-08-22 08:10:55 +02:00
Crawl
02f98cd7e6 fix(webpack): properly minifying 2018-08-22 05:05:11 +02:00
Crawl
7684ad3ca6 fix(webpack): properly emitting process deprecation warnings 2018-08-22 04:54:09 +02:00
Isabella
928fb30040 fix: actually fix Readonly typos 2018-08-21 14:25:30 -05:00
Isabella
c59d3299bc fix: typo in Activity#flags 2018-08-21 13:19:45 -05:00
Isabella
552323363b fix: disable getter-return 2018-08-21 12:40:49 -05:00
Isabella
d3e7dbc738 fix: pin & update deps 2018-08-21 11:37:08 -05:00
1Computer1
19c298f5cc refactor: rewrite message creation (#2774)
* Rework createMessage
- MessageAttachment is now structurally similar to FileOptions
- No longer mutates the object passed as options
- Supports more permutations of arguments

* Ignore complexity warning

* Refactor name finding

* Fix typo

* Update typings

* Default name to null for MessageAttachment

* Make Message#reply use transformOptions

* Move transformOptions

* Fix Message#reply

* Fix mutation

* Update tests

* Fix options passing

* Refactor into APIMessage

* Fix webhook send

* Expose APIMessage

* Add documentation

* Add types

* Fix type doc

* Fix another type doc

* Fix another another type doc (is this one even right!?)

* Remove trailing comma

* Properly clone split options

* Add support for sending file as stream

* Missed a doc

* Resolve files only once when splitting messages

* This looks nicer

* Assign directly

* Don't cache data and files

* Missing return type

* Use object spread instead Object.assign

* Document constructors

* Crawl is a little dot

* comp pls

* tests: sanitize local file path, disable no-await-in-loop
2018-08-21 18:22:29 +02:00
Isabella
4ee3cf0b55 fix: WebhookClient should handle ratelimits properly 2018-08-21 11:12:02 -05:00
SpaceEEC
55c58b60e7 typings: fix PermissionResolvable typedef, allow resolving of Readonly<BitField<T>> 2018-08-21 16:12:01 +02:00
SpaceEEC
d91deefd79 fix(RequestHandler): DiscordAPIError#path should be the path, not the route 2018-08-21 12:05:33 +02:00
bdistin
c62f01f0e4 refactor(BitField): base class for Permissions, ActivityFlags, Speaking (#2765)
* abstract BitField from Permissions

* reduce useless code, improve docs

* add a ReadOnly identifier to the return type of Bitfield#freeze()

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html#partial-readonly-record-and-pick

* fix the RangeError

* update docs, convert Speaking and ActivityFlags to bitfields

* fix some docs

* Fix Speaking BitField oops

* docs for oops

* more incorrect docs

* Fix incorrectly named property

* add new classes to index

* fix missing @extends docs

* default bitfield resolve to 0, and cleanup defaulting everywhere

Also removes GuildMember#missiongPermissions() alias that had incorrect behavior

* Breaking: Rename Overwrite allowed and denied to allow and deny

To be consistent with the api's naming

* fix setSpeaking usage to bitfields instead of booleans

* fix speaking bug in playChunk

* docs: Updated typings

* fix: BitFieldResolvable should use RecursiveArray

* bugfix/requested change

* typings: Cleanup (#2)

* typings: Fix BitField#{toArray,@@iterator} output type

* typings: correct PermissionOverwrites property names and nitpicks
2018-08-21 11:56:41 +02:00
Kyra
6be8172539 misc: add UNKNOWN_WEBHOOK error code (#2775)
* Add UNKNOWN_WEBHOOK error code

* docs: Update typings
2018-08-21 10:41:42 +02:00
Kyra
5787deef26 feat: GuildEmbed support (#2766)
* feat: Guild embed support

* docs: Fixed setEmbed's reason argument not being optional

* fix: Guild#setEmbed should return the guild itself for consistency

* docs: Updated typings

* fix: Requested change
2018-08-21 10:40:47 +02:00
Frangu Vlad
0401b8ad77 feat: handle and forward WEBHOOKS_UPDATE events (#2762)
* src: Handle WEBHOOK_UPDATE events

* Commit rename of 77'
Or adding the letter S

* I missed this

* Properly do this now
Typos everywhere

* Typings

* refactor: remove now unnecessary guild variable
2018-08-21 10:38:35 +02:00
Kyra
dc8cf08de9 backport: handle async stacktraces correctly (#2768) 2018-08-21 10:31:32 +02:00
Crawl
ab0ede0d5a fix: pin peer-deps to the latest version we allow 2018-08-20 18:43:53 +02:00
Crawl
8afc1fa545 fix: pin dev-deps to a higher version to avoid problems with upath on node 10 2018-08-20 18:38:26 +02:00
Crawl
f33ad64d12 chore: up ecmaVersion in eslint to support object rest spread 2018-08-20 18:30:19 +02:00
Frangu Vlad
4a24e8c12c Remove double iteration (#2773) 2018-08-19 13:37:00 +02:00
zajrik
68c832957d tests: Add typings lint runner to test script 2018-08-18 22:23:13 -05:00
Will Nelson
18d6be1eb3 update PR template (#2770)
* update PR template to encourage testing/typings

* add extra linebreak
2018-08-18 18:35:27 +02:00
SpaceEEC
7546ca3fe0 typings(Guild): add fetchVanityCode
PR: #2732
Commit: f8057b01cb
2018-08-18 17:22:57 +02:00
Florian
f8057b01cb feat: add guild.fetchVanityCode() (#2732)
* Error for guild.fetchVanityURL feature not enabled

* added GET/guilds/{guild.id}/vanity-url endpoint

* fix: code conventions

* adopted suggestion

* Changed error message according to change request

* Renamed method

to indicate that only the code is fetched, not the entire url.

* Update Guild.js
2018-08-18 13:57:58 +02:00
Frangu Vlad
94214fa733 misc: Remove Clyde (#2764)
* Remove Clyde

* Remove Clyde avatar overwrite

* Remove Clyde from the user pattern
2018-08-18 13:21:24 +02:00
zajrik
3b91fa0b49 tests(lint): Update typings lint script 2018-08-18 05:40:42 -05:00
zajrik
48f5a17fc4 cleanup(typings): Remove discord.js-test.ts
Useless file, filled with errors. Never served any real purpose. Discussed on discord. Can be replaced should a time come that we automate testing the typings further than just linting.
2018-08-18 05:35:09 -05:00
SpaceEEC
e7ee8d21d7 typings: VoiceState is extendable 2018-08-18 11:07:48 +02:00
SpaceEEC
58ce08255f typings: remove UserFlags and ClientApplicationCreateAssetsOptions
Leftover user bots declarations
2018-08-18 11:07:29 +02:00
SpaceEEC
c966aa2457 typings(VoiceRegion): remove no longer existing sampleHostname 2018-08-18 10:58:29 +02:00
Kyra
b2707e9ee5 cleanup(VoiceRegion): remove no longer existing sampleHostname (#2759) 2018-08-18 10:57:08 +02:00
Frangu Vlad
1e0379375e cleanup: remove more left-over selfbot constants (#2761)
* misc: Remove left-over selfbot stuff

* Forgot this
2018-08-18 10:55:09 +02:00
Frangu Vlad
e935611e50 fix(GuildBanAddHandler): not emitting guildBanAdd for uncached users (#2763) 2018-08-18 10:53:23 +02:00
zajrik
5fdd3a5877 tests(lint): Fix typings lint errors 2018-08-17 23:38:54 -05:00
zajrik
29d51fa582 tests: Fix typings lint script
Forgot to update it after moving the typings.
2018-08-17 23:11:06 -05:00
dependabot[bot]
e55f822ad4 build(deps-dev): update tslint requirement from ^3.15.1 to ^5.11.0 (#2745)
Updates the requirements on [tslint](https://github.com/palantir/tslint) to permit the latest version.
- [Release notes](https://github.com/palantir/tslint/releases)
- [Changelog](https://github.com/palantir/tslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/palantir/tslint/commits/5.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-17 23:07:08 -05:00
dependabot[bot]
418be7bef1 build(deps-dev): update tslint-config-typings requirement from ^0.2.4 to ^0.3.1 (#2746)
Updates the requirements on [tslint-config-typings](https://github.com/typings/tslint-config-typings) to permit the latest version.
- [Release notes](https://github.com/typings/tslint-config-typings/releases)
- [Commits](https://github.com/typings/tslint-config-typings/commits/v0.3.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-17 23:01:01 -05:00
SpaceEEC
6841b4e66a typings(VoiceConnection): receivers is now receiver and no longer an array
PR: N/A
Commit: e2726f5a9a
2018-08-17 16:58:41 +02:00
SpaceEEC
5942e8becc typings: remove user bots
PRs: #2559 #2758
Commits:
 - 5afd77ab73
 - 4999f675cd
2018-08-17 16:55:23 +02:00
Kyra
4999f675cd src: delete leftover UserConnection class (#2758) 2018-08-17 16:52:57 +02:00
bdistin
d437cecb3f Fix permission checking for Administrator channel overwrites (#2756) 2018-08-17 08:46:09 +01:00
Kyra
3f81b613d8 fix: Handle async stacks correctly (#2744)
* fix: Capture stack traces in APIRouter to preserve async stack

* fix: Handle the stack trace better

* fix: Check if error is an instance of Error (5XX rejects with Result)

* fix: Error.captureStackTrace is not supported in all browsers
2018-08-16 19:51:21 +01:00
Amish Shah
e2726f5a9a voice: remove createReceiver, just use VoiceConnection.receiver 2018-08-16 18:30:54 +01:00
Amish Shah
97c34b5b6f voice: clean up packet handling 2018-08-16 11:28:28 +01:00
Amish Shah
64832abfdb voice: clear connect timeout after connected (fixes #2752) 2018-08-15 14:25:47 +01:00
SpaceEEC
f5b3dff7f5 typings: make PermissionResolvable recursive 2018-08-15 15:13:08 +02:00
SpaceEEC
9a95b6a1e8 typings(Client): voiceStateUpdate now always has an old state
PR: N/A
Commit: 38597de271
2018-08-15 15:05:13 +02:00
Amish Shah
38597de271 voice: patch in default VoiceStateUpdate in case on doesn't exist, cache member 2018-08-15 14:02:11 +01:00
SpaceEEC
5d889be6db fix(Permissions): Permissions itself is a valid PermissionResolvable
fixes #2753
2018-08-15 13:55:04 +02:00
SpaceEEC
700201e3fe fix(GuildAuditLogs): default target to object with target_id (#2742) 2018-08-15 09:58:27 +02:00
SpaceEEC
616e0dd398 fix(Message): properly check for an edited_timestamp in patch
Fixes #2750
2018-08-15 09:18:17 +02:00
bdistin
6506252054 fix/refactor: fix GuildMember#presence getter and cleanup (#2751)
* Fix guild being a guild and not an AbstractHandler in PresenceUpdate

* update the default guild to be a Guild, and not GuildMember

* getters return null instead of undefined

* fix lint
2018-08-15 08:50:22 +02:00
Kyra
75254748b1 fix(Client): do not redefine _timeouts and _intervals of BaseClient (#2748)
Fixes an issue with the process permanently hanging.
2018-08-14 20:39:56 +02:00
SpaceEEC
9b5df571b3 refactor: typings for voice state and presences refactor
Commits: ea4375bf90...e0f52162ea
PR: N/A
2018-08-14 20:29:13 +02:00
bdistin
0ad7c24aa3 docs(User): fix hydrabolt's tag (#2747) 2018-08-14 19:09:10 +02:00
Amish Shah
e0f52162ea voice: allow for streaming silence to avoid audio glitches with repeated pausing/resuming (#2354) 2018-08-14 12:12:59 +01:00
Amish Shah
e666574f36 document GuildMember#voice 2018-08-14 11:50:11 +01:00
zajrik
efc8445260 refactor: Merge typings into 11.4-dev branch 2018-08-13 22:20:33 -05:00
zajrik
7864653df7 Add missing EOF newlines 2018-08-13 20:54:36 -05:00
zajrik
1ff56eb09d Merge typings into master 2018-08-13 20:51:41 -05:00
Schuyler Cebulskie
afcac9196d Update issue templates 2018-08-13 21:46:14 -04:00
Isabella
bb0700ade3 fix: Util#cleanContent parsing of GuildMember 2018-08-13 15:59:35 -05:00
Amish Shah
6852a15cee voice: fix StreamDispatcher#pause trying to call null function 2018-08-13 17:54:11 +01:00
Amish Shah
bfde1dd8f2 fix: StreamDispatcher doesn't emit finish if ended while paused (#2648) 2018-08-13 17:35:21 +01:00
Amish Shah
edf9c448fb fix: message passing empty data to GuildMember#_patch 2018-08-13 16:49:10 +01:00
Amish Shah
d276850c52 fix: GuildMemberStore now works with custom structures again 2018-08-13 16:21:11 +01:00
Amish Shah
332e30d31e fix: GuildMemberStore now patches existing members (#1870) 2018-08-13 16:02:05 +01:00
Amish Shah
ebfbf20f07 Bump to 11.4.2 2018-08-13 15:19:21 +01:00
Souji
3021e5ce7f Docs: document ChannelData.parent and .permissionOverwrites, fix typedefs to not include Collection of ChannelCreationOverwrite (#2734)
* document ChannelData.parent

* document ChannelData.permissionOverwrites

* Overwrites also take other things, account for it

* note to self: stop copy-pasting

* remove eslint madness, fix param defs

* fix property slip
2018-08-13 15:17:09 +01:00
Schuyler Cebulskie
b5df8603e8 Update version in web builds example 2018-08-12 17:01:32 -04:00
Kolkies
8b1bb95b1a docs: update for 11.4.0 (#2727)
* Update for 11.4.0 docs
2018-08-12 13:20:08 -05:00
Lewdcario
6775684ff0 chore: update typings & bump version 2018-08-12 13:14:52 -05:00
Lewdcario
d772bff632 fix(ClientDataManager): replacing channels unecessarily 2018-08-12 11:50:01 -05:00
Jacz
180813d3e8 Consistency with Getters. 2018-08-12 07:41:10 +01:00
Jacz
f9da255b44 More preformant way, forgot to commit this before whoops 2018-08-12 07:40:13 +01:00
Jacz
c1183f3534 Fixes VoiceChannel.members bug
Closes #2736
2018-08-12 07:40:13 +01:00
bdistin
b7e61f21ca fix(PresenceStore): pass user id as extra (#2733)
fix #2731
2018-08-11 18:24:30 +02:00
Amish Shah
e2ceea65ba Fix default presence for Users 2018-08-11 11:48:18 +01:00
Amish Shah
8ac664801c GuildChannel#setParent should allow channel to be a Snowflake (#2644) 2018-08-11 11:34:24 +01:00
Amish Shah
7968442dbf VoiceChannel#members should be a Collection, not an Array 2018-08-11 11:27:34 +01:00
Amish Shah
ea764afad2 add ClientPresence, remove ClientPresenceStore 2018-08-11 10:46:51 +01:00
Amish Shah
3c2eaff226 fix default presences again, remove redundant extras in PresenceStore 2018-08-11 10:19:31 +01:00
SpaceEEC
8adfc97409 docs(Client): actually fix rateLimit's event params 2018-08-11 09:38:58 +02:00
Amish Shah
f5ea673ebd fix default presence 2018-08-11 00:26:24 +01:00
Amish Shah
34ed3c6014 Update documentation for presenceUpdate 2018-08-10 17:09:05 +01:00
Amish Shah
e059581eee GuildMember#voice never undefined, improve documentation for VoiceState 2018-08-10 17:05:26 +01:00
Amish Shah
00ac62f975 chore: update typings 2018-08-10 16:59:01 +01:00
Amish Shah
08eff66939 Make presences track users and guilds, emit them in presenceUpdate 2018-08-10 16:46:14 +01:00
Amish Shah
fe8ece0192 voice state fixes 2018-08-10 15:15:52 +01:00
Amish Shah
df54d11dce Merge branch 'master' of https://github.com/hydrabolt/discord.js 2018-08-10 14:45:07 +01:00
Amish Shah
be5efea461 rewrite voice state handling 2018-08-10 14:44:59 +01:00
NbOpposite
ea4375bf90 Fixed splitting messages with codeblocks (#2720) 2018-08-10 15:44:32 +02:00
Kyra
0f63c50c06 fix: Util.basename being unreliable (#2679)
* fix: Util.basename being unreliable

new URL for WHATWG parsing was not chosen because it only works for URLs and threw in local pathes, path.basename is unreliable (according to the devs' note), and path.parse seems to work well.

* docs: Update Util.basename's description
2018-08-10 11:23:22 +02:00
Isabella
2c8e15e31c docs fix: RoleResolvable typedef missing and incorrecty documented methods (#2640)
* docs fix: RoleResolvable typedef missing and incorrecty documented methods

* requested changes???

* REAL requested changes

* shhh
2018-08-10 11:08:48 +02:00
Alex Hîncu
ce8a679a14 fix(Collection): use Symbol.species for creating derived collections (#2715) 2018-08-10 10:57:33 +02:00
Souji
0a21280990 add Collection as possible param to GuildChannel#overwritePermissions + wording port from 11.3-dev (#2719)
* add Collection as possible param to GuildChannel#overwritePermissions

* change PermissionoverwriteOptions desc. default to unset

* fix eslint hiccup

* fix spelling of snowflake
2018-08-10 10:57:05 +02:00
Yukine
147488df89 use null for getters (#2723) 2018-08-10 10:56:07 +02:00
Amish Shah
72bb9cb532 voice deps: fix prism-media requirement 2018-08-09 22:40:31 +01:00
Lewdcario
0e370d7a4c docs: fix client#rateLimit parameters 2018-08-09 14:58:17 -05:00
Lewdcario
7126cade45 fix: richEmbed#_apiTransform fields 2018-08-09 13:52:50 -05:00
Lewdcario
bef07152c8 chore: update typings & bump version 2018-08-09 11:47:52 -05:00
Amish Shah
16331d9e85 chore: update typings 2018-08-09 17:34:59 +01:00
Souji
bafbee9677 docs: small changes regarding permissions/overwrites (#2718)
* Add Collection as param to GuildChannel#replacePermissionOverwrites

* Add example for null to PermissionOverwriteOptions

* eslint-disable max-len

* PermissionOverwriteOptions desc. change default to unset

* deprecated allow/deny in favor of allowed/denied
2018-08-09 10:52:59 -05:00
Amish Shah
be56087c23 lint error 2018-08-09 14:00:33 +01:00
Amish Shah
ee6c19ca7e voice: rewrite GuildMember#speaking tracking (#2540) 2018-08-09 13:59:52 +01:00
Isabella
f3d7f7c3bd refactor: move Message#cleanContent function to Util (#2703)
* refactor: move Message#cleanContent function to Util

* suggested changes
2018-08-09 14:27:05 +02:00
1Computer1
8e0ea9aa16 Collection debug methods, remove deleteAll (#2577) 2018-08-09 14:25:07 +02:00
Amish Shah
55863efa15 voice: don't clear reject timeout until connection fully resolved (#2421, #2578) 2018-08-09 13:00:46 +01:00
Lewdcario
6da423fc07 backport: Permissions#toArray 2018-08-08 22:17:08 -05:00
Lewdcario
1e5b5b83c8 backport: GuildChannel#permissionsFor(role) 2018-08-08 22:16:46 -05:00
Lewdcario
c76f3048af backport: TextChannel#bulkDelete accepts Snowflake[] 2018-08-08 17:14:52 -05:00
Souji
af6d649510 docs: change for GuildChannel#replacePermissionOverwrites (#2714) 2018-08-08 16:09:39 -05:00
Lewdcario
9dfcb61a90 Revert "fix: Shards not receiving regular messages"
This reverts commit 88616eaf3e.
2018-08-08 13:03:29 -05:00
Amish Shah
8152841bab Try to cache members from data in message payloads 2018-08-08 12:45:49 +01:00
Crawl
5980d04f2b docs: implement #2707 on master 2018-08-08 12:48:34 +02:00
DennisV2809
47d405e70c Small typo in documentation of Message.js (#2704)
* Update Message.js

message.reply() example fix

* Update Message.js
2018-08-08 12:41:35 +02:00
SpaceEEC
c7f379f51d docs(RichEmbed): timestamp is actually a Date 2018-08-07 21:46:54 +02:00
SpaceEEC
4a48a7d621 docs(ShardingManager): respawnAll actually resolves with a collection of shards keyed by numbers 2018-08-07 21:36:03 +02:00
Amish Shah
98dc2df6d4 Revert "fix(Collection): use new this.constructor instead of new Collection (#2709)"
This reverts commit c10b4feeeb.
2018-08-07 19:08:51 +01:00
Amish Shah
382afee436 deps: update prism peer dep to point to right account 2018-08-07 18:25:42 +01:00
Amish Shah
46fa9603c2 voice: delete receive stream immediately to prevent it being written to after end (#2678) 2018-08-07 17:34:01 +01:00
Alex Hîncu
c10b4feeeb fix(Collection): use new this.constructor instead of new Collection (#2709) 2018-08-07 18:08:49 +02:00
Lewdcario
c33ab1ea61 backport: add PRIORITY_SPEAKER permission 2018-08-03 19:09:09 -06:00
Yukine
b38f537da8 feat: Add new Permission PRIORITY_SPEAKER (#2698) 2018-08-03 20:19:19 -04:00
Lewdcario
87b4b23596 backport: fix circular conversion when editing RichEmbed 2018-08-03 15:33:51 -06:00
Lewdcario
b63948e14e backport: RichEmbed#attachFiles 2018-08-02 15:06:27 -06:00
Frangu Vlad
4ae58f66f4 fix: Wrong _patch call from GuildEmoji#edit and other issues (#2673)
* Fix bugs

* Make the data.roles be undefined before API call

* Suggested changes

* Handle edit properly
2018-07-31 12:43:17 -04:00
Lewdcario
88616eaf3e fix: Shards not receiving regular messages 2018-07-31 09:55:32 -06:00
Will Nelson
9796489cbf remove hard-coded domain in welcome logo 2018-07-27 08:19:51 +01:00
Lewdcario
4a9c2f8884 fix(Emoji#fetchAuthor): reject with Error rather than TypeError 2018-07-26 14:35:26 -06:00
Lewdcario
41f6eaa635 backport: Message#url getter 2018-07-26 11:22:29 -06:00
Lewdcario
95a2d25b7d chore: deprecate userbot methods 2018-07-26 11:18:41 -06:00
Lewdcario
d685e39af4 backport: add rejection for Emoji#fetchAuthor if managed
Signed-off-by: Lewdcario <isabellafj97@gmail.com>
2018-07-26 10:24:26 -06:00
Lewdcario
96011cf68f backport: make Webhook token not enumerable 2018-07-26 09:51:47 -06:00
dependabot[bot]
92d753abe4 build(deps): update ws requirement to ^6.0.0 (#2670)
Updates the requirements on [ws](https://github.com/websockets/ws) to permit the latest version.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits/6.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-26 04:38:56 +02:00
Isabella
ba32eec7e8 feat(Message): add url getter (#2594)
* feat(Message): add jumpToURL getter

* fix url

* url syntax update

* name to url
2018-07-26 04:38:11 +02:00
bdistin
5afd77ab73 refactor: remove user bot methods (#2559)
* [WIP] Remove user bots

* more backend userbot removal

* Add mfaEnabled back

* revert client presences store removal

* partially revert getAuth changes

* remove more no longer used children of ClientUserGuildSettings

* fix a bug with this pr and TextBasedChannel.applyToClass

* remove a syncGuilds reference

* more user bot data handling

* various guildSync cleanup

* bots can't call logout

Had the user/bot portions of the code mixed up. Though, does this need to be a promise anymore?

* make ClientManager#destroy() sync

It nolonger needs to be a promise, and nothing depended on it being a promise that I can tell.

* requested change

* Fix massive error

* no longer used as it's userbot only
2018-07-25 22:14:23 -04:00
Yukine
f963621ef1 fix(GuildEmoji): added a check for managed emojis in fetchAuthor (#2645) 2018-07-25 21:11:38 -04:00
PLASMAchicken
c46cbbfd84 docs: added sizes 16, 32, 64 (#2666)
* documented sizes 16, 32, 64

* Removed space

* Added typedef

* The options to provide => Options for the Image URL

* fixed
2018-07-25 21:04:47 -04:00
Isabella
488b1eb4ee backport: Sharding utility methods (#2672) 2018-07-25 12:08:08 -04:00
Lewdcario
6d70da5b1e backport: fix circular conversion in RichEmbed 2018-07-23 22:41:07 -06:00
Lewdcario
e4da97e058 eslint: re-enable eslint after disabling max-len 2018-07-23 14:34:38 -06:00
Isabella
3a7a7d730b fix(MessageReaction): only delete reaction if cache and count is empty (#2661) 2018-07-23 16:32:51 -04:00
SpaceEEC
fbbd8f43b3 chore: update typing submodule 2018-07-22 20:37:38 +02:00
Gymnophoria
717e7f094a docs(Client): clarify messageReactionRemove event's user description (#2657)
* Clarify messageReactionRemove user description

* Update MessageReactionRemove.js

* wait one more word difference lol
2018-07-18 11:41:05 +02:00
SpaceEEC
36806612bf fix(Invite): support for group dm invites (#2603)
* fix(Invite): support group dm invites

* refactor(Invite): mark all optional properties as nullable and default them to null
2018-07-18 11:39:34 +02:00
SpaceEEC
886c21223e fix(GuildAuditLogs): default to PartialGuildChannel if channel deleted (#2605) 2018-07-18 11:38:59 +02:00
Kyra
e0378cf350 refactor(Webhook): make token not enumerable (#2566)
* Hide Webhook#token (consistency with Client#token)

* Make `Webhook#token` writable

* fix: devsnek's requested change

Webhook#token must be both writable and configurable.
2018-07-18 11:37:57 +02:00
Gymnophoria
a97b5040e6 docs(Client): clarify messageReactionRemove event's user description (#2657)
* Clarify messageReactionRemove user description

* Update MessageReactionRemove.js

* wait one more word difference lol
2018-07-18 11:37:36 +02:00
Lewdcario
524a15df0b backport: Permissions improvements 2018-07-17 21:49:21 -05:00
Lewdcario
0702a0fcda backport: DefaultMessageNotifications 2018-07-17 21:32:24 -05:00
SpaceEEC
3d25277839 chore: update typings submodule 2018-07-15 08:42:40 +02:00
Amish Shah
7d2744be89 voice: use development version of prism 2018-07-12 16:11:04 +01:00
Lewdcario
f67d682223 fix(ShardingManager): respawnAll shard iteration 2018-07-10 21:39:58 -05:00
SpaceEEC
1d9edec567 fix(Message): keep reply option when replying with an embed or attachment
Fixes #2651
2018-07-08 21:40:12 +02:00
SpaceEEC
526832058e fix(Message): keep reply option when using an embed or attachment
See #2651
2018-07-08 21:12:30 +02:00
Amish Shah
d81441f627 voice: null-check UDP socket 2018-07-03 14:15:27 +01:00
Amish Shah
695ff1e70f voice: fix #2635 (channel bitrate not being set) 2018-07-02 19:45:35 +01:00
Souji
95b2dd3fe6 feat: Add support for Guild#setDefaultMessageNotifications (#2624)
* Feat: Guild#setDefaultMessageNotifications

* fix typo
2018-07-01 11:03:47 -05:00
Lewdcario
077d41fbca fix(Webhook): import Channel correctly 2018-07-01 10:19:44 -05:00
Lewdcario
938d87d5d6 fix(Shard): actually remove default execArgv 2018-07-01 10:17:20 -05:00
Lewdcario
a667e44c4d fix(Client): login catch 2018-07-01 10:05:56 -05:00
Lewdcario
3d82ca901b docs: improvements in various places
* Client#login example consistency

* add warning to Client#fetchApplication

* incorrect WEBHOOK_DELETE value
2018-06-29 19:38:20 -05:00
Lewdcario
448f38429d fix(Client): login not properly rejecting on invalid token 2018-06-29 19:38:06 -05:00
Lewdcario
3fa9ed1f42 backport: deleted property 2018-06-29 19:11:50 -05:00
Lewdcario
72346fb47e fix(TextBasedChannel): bulkDelete should not return non-Promise 2018-06-29 17:32:56 -05:00
Lewdcario
2694c0d442 fix(RequestHandler): provide proper route and method 2018-06-29 15:13:03 -05:00
Lewdcario
93f8c8547b fix(Shard): allow node to default to process.execArgv 2018-06-29 15:13:01 -05:00
Lewdcario
92e2c3c7fd fix: instantiate constructors before using those properties 2018-06-29 15:12:52 -05:00
Lewdcario
41a1dee533 fix(Util): circular reference 2018-06-29 13:02:38 -05:00
dependabot[bot]
bcdb8011e3 build(devDeps): update eslint requirement to ^5.0.1 (#2629)
* build(devDeps): update eslint requirement to ^5.0.1

Updates the requirements on [eslint](https://github.com/eslint/eslint) to permit the latest version.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v5.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* fix(eslint): disable getter-return rule
2018-06-26 23:14:54 +02:00
bdistin
f711aa35ac fix: typo in src/errors/messages.js (#2631)
fixes #2630
2018-06-26 19:07:09 +02:00
Lewdcario
6b3bfdd7de fix(Shard): fix default args 2018-06-25 16:10:50 -05:00
FireController1847
ac0c15f7f1 Change ytdl example (#2619) 2018-06-24 15:47:54 +02:00
Isabella
bfbb723f42 feat(ShardingManager): add execArgv option (#2585) 2018-06-23 16:09:03 -05:00
bdistin
58e5017159 fix: ratelimits (#2615)
* Add timeDifference calcs back into ratelimits

And fix x-ratelimit-reset is in seconds, not ms: https://puu.sh/AIXxY/9b3989b248.png

* mutate reset time with date header instead

* fix defaulting of reset and remaining

if the reset header is not available, then the reset time should be Date.now() instead of the difference between the date header and Date.now()

If the date header is null, fall back to Date.now() since it's the best we can do (this should never happen, but safer to handle it just in case)

if remaining is 0 we don't want to default it back to 1 since 0 is falsy
2018-06-23 16:08:40 -05:00
Souji
de408d735b docs(Guild): memberCount is not as of ready (#2621)
but updated every guild member add or remove
2018-06-23 15:22:57 +02:00
Mikhail
bf738b34de fix(BasePlayer): incorrectly mutating FFMPEG_ARGUMENTS when using seek (#2622)
Because args was not a copy of FFMPEG_ARGIMENTS, but a reference to it, pushing 'ss' argument pushed it to FFMPEG_ARGUMENTS, making it persistent.
2018-06-23 15:20:59 +02:00
Amish Shah
18646b72f9 voice: use getters where possible 2018-06-22 18:46:51 +01:00
Amish Shah
08bbbe9301 voice: handle new client_connect and client_disconnect packets 2018-06-22 18:38:33 +01:00
Amish Shah
9296a30148 voice: account for speaking now being a bitmask 2018-06-22 17:47:00 +01:00
Amish Shah
1f7c1ddaa2 voice: start update to v4, fix heartbeats 2018-06-22 17:42:04 +01:00
Amish Shah
3d41748a38 voice: fix not passing volume to transform constructor 2018-06-21 21:50:54 +01:00
Camzure
7ce1d1642c docs: only cached messages emit reaction events (#2607)
* wording improvement

* wording improvement for docs

* docs: wording

* wording

* user account only: docs

* Edited

* Edited

Signed-off-by: SpaceEEC <spaceeec@yahoo.com>
2018-06-21 21:40:52 +02:00
Camzure
9997a67ab6 Docs: Wording Improvements (#2607)
* wording improvement

* wording improvement for docs

* docs: wording

* wording

* user account only: docs

* Edited

* Edited
2018-06-21 21:35:52 +02:00
SpaceEEC
8a3ae875bb fix: do not cache webhook users (#2611)
Goal in mind is to not save the name and avatar used by webhooks because
those can change between messages without any other update.
2018-06-21 21:34:30 +02:00
SpaceEEC
bd3d8d48c0 docs(GuildMember): joinedAt is nullable
See: ecf6e2b62d
2018-06-21 21:24:53 +02:00
Will Nelson
594363a05e fix response parsing (#2614)
* fix response parsing

* rfc: better parseResponse function
2018-06-21 00:11:47 +02:00
Amish Shah
99a9a813d7 voice dep: bump prism-media to 0.3.0 2018-06-20 20:44:27 +01:00
Kyra
270a278a6e feat(Guild): add support to edit defaultMessageNotifications level (#2592)
* Added support for `defaultMessageNotifications`

* Requested changes

* docs: Change type for GuildEditData.defaultMessageNotifications
2018-06-19 21:16:05 +02:00
Will Nelson
5e011dbc11 switch to node-fetch (#2587)
* switch to node-fetch

* remove useless var declaration

* remove method uppercasing

* rework concurrency

* Revert "rework concurrency"

This reverts commit ef6aa2697e.

* fix headers
2018-06-19 20:10:55 +02:00
Souji
791f58e130 docs: add video to MessageAttachment properties (#2608) 2018-06-19 20:09:55 +02:00
RumbleFrog
c5fea45f30 fix(ShardClientUtil): send method erroneously rejecting (#2604) 2018-06-17 19:47:42 +02:00
RumbleFrog
493ba73037 fix(ShardClientUtil): send method's promise erroneously rejecting (#2604)
Patches the remaining ones that were missed in eef4a4ad17
2018-06-17 08:21:51 +02:00
Schuyler Cebulskie
d97af9d2e0 Improveder 2018-06-17 00:51:32 -04:00
Schuyler Cebulskie
f91747a764 Improve Shard#kill description 2018-06-17 00:50:38 -04:00
reeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
e7eab427e5 docs: document lastMessageID for TextChannel and (Group)DMChannel (#2602)
* Adds JSDocs for TextChannel.lastMessageID

* oops

* docs: document lastMessageID in (Group)DMChannel as well
2018-06-16 22:28:12 +02:00
reeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
507cce3ff4 docs: document lastMessageID for TextChannel and (Group)DMChannel (#2602)
* Adds JSDocs for TextChannel.lastMessageID

* oops

* docs: document lastMessageID in (Group)DMChannel as well
2018-06-16 22:10:24 +02:00
bdistin
037e8cf969 fix(Messages): undeleting themselves (#2570)
when a _patch() is queued
2018-06-16 21:16:57 +02:00
Kyra
e8ab049a67 refactor(MessageMentions): make client, guild, and _content non enumerable 2018-06-16 17:14:10 +02:00
Will Nelson
56f461a8b5 use new multiple issue templates (#2600) 2018-06-16 10:02:48 +02:00
Amish Shah
1cdee7b48a voice: reimplement seek option (#2572) 2018-06-13 21:16:14 +01:00
Amish Shah
04618f554f voice: fix _writeCallback being called multiple times (#2567) 2018-06-13 21:06:50 +01:00
Amish Shah
3bfc1ff61c voice: fix write after end (#2567) 2018-06-13 21:02:19 +01:00
Amish Shah
d69e906027 voice: fix voice receive after enabling suffix and lite encryption modes 2018-06-13 20:43:18 +01:00
SpaceEEC
14eadb3ce0 chore: update submodule 2018-06-13 08:54:44 +02:00
Lewdcario
ba9a93b0bf docs: last english fix for now 2018-06-12 18:54:51 -05:00
Lewdcario
eb4607c8ad docs: fix english because english is difficult 2018-06-11 21:18:15 -05:00
Lewdcario
5eff360a4d docs: wording improvements 2018-06-11 16:37:34 -05:00
iDroid
bce9a8af1b feat(User): add locale property (#2571) 2018-06-10 10:58:00 -05:00
bdistin
99bd355522 refactor: RESTManager handlers to use collection (#2539) 2018-06-10 05:45:34 +02:00
Lewdcario
6de5acbac3 backport: RichPresence 2018-06-09 15:37:01 -05:00
Lewdcario
ecf6e2b62d fix(GuildMember): mark joined as nullable 2018-06-09 15:15:08 -05:00
dependabot[bot]
fc96cfbc00 Revert "build: update snekfetch requirement to ^4.0.1 (#2580)"
This reverts commit 46af6e3396.
2018-06-06 09:09:27 -06:00
Lewdcario
5071477172 fix(GuildMember): account for joinedTimestamp as well 2018-06-05 20:14:34 -05:00
Lewdcario
13bfceb83c fix(GuildMember): mark joined as nullable and fix fetching for these cases 2018-06-05 19:50:36 -05:00
dependabot[bot]
46af6e3396 build: update snekfetch requirement to ^4.0.1 (#2580)
Updates the requirements on [snekfetch](https://github.com/devsnek/snekfetch) to permit the latest version.
- [Release notes](https://github.com/devsnek/snekfetch/releases)
- [Commits](https://github.com/devsnek/snekfetch/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-05 09:26:20 +02:00
Lewdcario
c8ecbe6585 docs: GuildMember#speaking
and consistency improvements
2018-06-05 00:33:54 -05:00
Lewdcario
09708482f6 fix(ReactionUserStore): fetch inconsistency
It should be consistent with MessageStore#fetch now
2018-06-05 00:33:52 -05:00
Lewdcario
dfbd4bdde1 docs: add examples & improve notices 2018-06-05 00:33:43 -05:00
Lewdcario
caa4104b95 docs: GuildMember#speaking
closes #2540
also improves consistency
2018-06-05 00:31:06 -05:00
Lewdcario
f238883046 fix(MessageReaction): fetchUsers inconsistency
Unlike TextChannel#fetchMessages, this method returned the cache rather than the fetched items, so in interests of consistency, this does as well now
closes #2574
2018-06-05 00:31:03 -05:00
Lewdcario
eef4a4ad17 fix(Shard): erroneously returning false
The node documentation fails to correctly document when the backlog of unsent messages exceeds a certain threshhold the function will return false. This does not mean it will refuse to send- simply that it will take time. Issue in point: https://github.com/nodejs/node/issues/7657#issuecomment-240581726
2018-06-05 00:31:00 -05:00
Lewdcario
c699888780 docs: add examples & improve notices 2018-06-05 00:30:50 -05:00
Lewdcario
512af54e5d fix(Shard): erroneously returning false
The node documentation fails to correctly document when the backlog of unsent messages exceeds a certain threshhold the function will return false. This does not mean it will refuse to send- simply that it will take time. Issue in point: https://github.com/nodejs/node/issues/7657#issuecomment-240581726
2018-06-04 18:01:10 -05:00
Lewdcario
0387d34ab4 fix(VoiceChannel): deletable erroneously returning true 2018-06-04 17:18:27 -05:00
Lewdcario
0be0d2542d fix(VoiceChannel): deletable erroneously returning true 2018-06-04 17:16:35 -05:00
Lewdcario
46b19bbbdb fix(GuildMember): Invalid Date 2018-06-04 16:24:42 -05:00
dependabot[bot]
276109ed3c build: update webpack-cli requirement to ^3.0.1 (#2579)
Updates the requirements on [webpack-cli](https://github.com/webpack/webpack-cli) to permit the latest version.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/commits/v3.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-06-04 09:26:10 +02:00
SpaceEEC
faf27fabc0 chore: update typings submodule 2018-05-29 11:24:02 +02:00
Kyra
d02c303afd fix(Guild): equals method modifying features array of guild (#2544)
* Fixed a bug where Guild#equals would cause the given guild to lose its features

* Fix Util.arraysEqual

* Fixed docs for Util.arraysEqual

* Remove Util.arraysEqual
2018-05-29 11:15:19 +02:00
Kyra
30c7d6d1b1 feat(Guild#defaultMessageNotifications) (#2538)
* feat(Guild#defaultMessageNotifications)

* boolean -> DefaultMessageNotifications

* Space's requested change
2018-05-28 17:44:04 -05:00
Braxton
f0c4d0e834 feat: Add "deleted" property to multiple structures. (#2556)
* Add "deleted" property to "Message" structure

* Add "deleted" property to Multiple structures

Structures edited:
- Channel
- Emoji
- Guild
- Guild Member
- Role

* Update "deletable" getter

* Fix ESLint "no-trailing-spaces" errors

* Requested Change: Mark w/ bulkDelete
2018-05-28 17:42:51 -05:00
Adrien Brignon
13880fe7de docs(Guild): handle error in example of fetchInvites correctly (#2568) 2018-05-27 20:59:12 +02:00
Adrien Brignon
27fcb64187 docs(Guild): handle error in example of fetchInvites correctly (#2568) 2018-05-27 20:57:50 +02:00
Dim
5494f8e3bd Fix: Incorrect NSFW Status on Channels (#2499)
* Fix #2498

* wow this code seems familiar

* please be the last iteration
2018-05-27 03:57:33 -05:00
Will Nelson
fc81924724 feat: Shard#kill method (#2454)
* add shard#kill method

* docs consistency
2018-05-27 03:26:18 -05:00
SpaceEEC
14aab1be38 fix(RequestHandler): only retry once on 5xx (#2471) 2018-05-25 17:33:17 +02:00
SpaceEEC
f23b61794c fix(ClientUser): correctly resolve nicks to an object in createGroupDM 2018-05-25 17:23:09 +02:00
SpaceEEC
f456f4c3c0 feat(Collection): backport partition method
Commit: a732402c95
PR: #2511
2018-05-25 16:49:10 +02:00
SpaceEEC
f921261f3f fix(docs): remove duplicated Collection#findAll docstring
Also added intended @ deprecated decorators
2018-05-25 16:44:49 +02:00
SpaceEEC
56a9d1ba3c docs(Collection): make findKey method show up in docs
Solved by moving the eslint-enable line below the method header.
2018-05-19 08:50:39 +02:00
bdistin
25b654d494 consistency is king (#2554) 2018-05-18 03:30:19 +02:00
Lewdcario
75747f5b18 fix: RequestManager getting stuck on global ratelimit
fixes #2550
2018-05-14 22:55:50 -05:00
1Computer1
a732402c95 refactor: remove unnecessary Collection methods and add Collection#partition (#2511)
* Rework collection

* Fix docs

* Remove (prop, value) behavior

* Add back thisArg

* Put examples on same line

* Revert map to return array

* Make examples less specific

* Add thisArg to sweep and partition
2018-05-14 01:15:43 -05:00
Lewdcario
6070b22382 docs: using deprecated version of find 2018-05-13 04:41:58 -05:00
Lewdcario
b2d1cb6a3d docs: permissions 2018-05-12 00:51:08 -05:00
Lewdcario
09ddbcb88a chore: deprecations 2018-05-12 00:40:12 -05:00
Lewdcario
6f02be2b2e docs: rateLimit event 2018-05-11 23:21:39 -05:00
Lewdcario
0d90798c6c backport: rateLimit event 2018-05-11 20:55:31 -05:00
Lewdcario
379061987c fix: burst request mode hanging permanently 2018-05-11 19:27:34 -05:00
SpaceEEC
75ebd5d23c chore: update typings submodule 2018-05-10 16:34:03 +02:00
Amish Shah
43c92c13e2 voice: support xsalsa20_poly1305_lite and xsalsa20_poly1305_suffix 2018-05-10 12:11:22 +01:00
Amish Shah
685814aa61 voice: make sure speaking is false when paused 2018-05-09 18:44:46 +01:00
1Computer1
de7d90ada3 feat(Collection): add tap method (#2507)
* Add Collection#inspect

* No u

* Rename to tap

* Rename variable

* Do it here too
2018-05-09 16:46:54 +02:00
bdistin
2b6592ed54 feat(Collection): add sweep method (#2528) 2018-05-09 16:42:28 +02:00
SpaceEEC
9bb8831619 feat(GuildMember): add manageable getter 2018-05-09 16:38:28 +02:00
SpaceEEC
99041671f0 feat(GuildChannel): add fetchInvites method
Backported from commit: 47bc0fc51e
PR: #2339
2018-05-09 16:28:40 +02:00
SpaceEEC
dd7eedbd48 feat(Emoji): add fetchAuthor method
Backported from commit: e0cbf0bb60
PR: #2315
2018-05-09 16:20:41 +02:00
SpaceEEC
c0ca73a40c feat(Game): add toString method
Backported from commit: 016526486c
PR: #2313
2018-05-09 16:08:59 +02:00
SpaceEEC
15a8e17710 fix(Guild): memberCount not decrementing when an uncached member leaves
Backported from commit: 93e083da4f
2018-05-09 16:07:20 +02:00
SpaceEEC
54913d9edb feat(GuildChannel): add setNSFW method
Backported from commit: 0fc9459450
PR: #2050
2018-05-09 16:04:49 +02:00
Gus Caplan
9169958264 feat(Guild): add verified getter (#2027) 2018-05-09 15:52:00 +02:00
Amish Shah
841b9de918 voice: mark speaking as false when paused, prevent repeated pausing 2018-05-09 14:33:23 +01:00
SpaceEEC
96b115ef7b feat(ClientDataResolver): add 2 basic role colors
Commit: 3a3ca96b0d
PR: #2303
2018-05-08 22:35:35 +02:00
Will Nelson
2d831269ab feat(Permissions): add valueOf method (#2363) 2018-05-08 22:30:27 +02:00
Jonah Snider
e5e59cce32 docs(Role): Change 'the this' to this (typo) (#2377)
Commit: 8b679913a4
2018-05-08 22:27:58 +02:00
Pascal
ae28f52e0d fix(ClientDataResolver): always resolve with a buffer when fetching a file
Commit: 85413481ed
2018-05-08 22:25:49 +02:00
SpaceEEC
9264511092 docs(ClientUser): correct warning for createGuild method
Backported from: 2bf68dcdfb
PR: #2453
2018-05-08 22:06:07 +02:00
SpaceEEC
2f2e28183b fix(Role): allow role color to be removed
Backported from: f985b6bef3
PR: #2447
2018-05-08 22:05:56 +02:00
SpaceEEC
54fa5f644f docs(GroupDMChannel): fix top 'an user' -> 'a user' 2018-05-08 20:14:23 +02:00
bdistin
b757f9ef2d docs(Collection): fix spelling of 'behavior' (#2529) 2018-05-08 19:07:49 +02:00
Kyra
bd9c9ce4e0 refactor(VolumeInterface): remove usage of deprecated new Buffer (#2531) 2018-05-08 18:55:52 +02:00
SpaceEEC
60288d0704 fix(Collector): increase and decrease max listeners dynamically 2018-05-08 11:57:12 +02:00
SpaceEEC
ed8ab91782 feat(Emoji): add deletable getter
Backport for commit: fca6d3be56
From PR: #2535
2018-05-08 11:35:14 +02:00
SpaceEEC
6cde6decee fix(GuildEmoji): verify MANAGE_EMOJIS permission from Guild#me 2018-05-08 11:29:36 +02:00
Kyra
fca6d3be56 feat(GuildEmoji): add deletable getter (#2535)
* feat(GuildEmoji#deletable)

* Update: Discord API returns 50001

When you try to get or delete a managed emoji from the API, you get a 50001 (Missing Access) error code.
2018-05-06 21:12:16 +02:00
SpaceEEC
21326f67a0 feat(ClientDataResolver): account for discord.gg/invite/<code> invites 2018-05-04 18:49:53 +02:00
SpaceEEC
90312952d9 revert: "Improved TextBasedChannel#send (#2537)"
This reverts commit 556e679bdb,
which broke resolving of non object literal message options.
2018-05-04 16:44:06 +02:00
Kyra
556e679bdb Improved TextBasedChannel#send (#2537) 2018-05-04 14:56:22 +02:00
bdistin
7a3a4d1388 feat: add Collection#sweep() (#2528) 2018-05-04 02:27:59 -05:00
Will Nelson
32369f3bdd fix: prevent max listener problems with collectors (#2521) 2018-05-04 02:11:52 -05:00
1Computer1
9f918199d2 feat: add Collection#tap (#2507)
* Add Collection#inspect

* No u

* Rename to tap

* Rename variable

* Do it here too
2018-05-04 02:08:32 -05:00
Kyra
8700e965c5 feat(DiscordAPIError): backport method property (#2536) 2018-05-03 22:47:50 +02:00
SpaceEEC
ddab8096cf feat(DataResolver): account for discord.gg/invite/<code> invites 2018-05-03 21:09:55 +02:00
Kyra
42ce4f8bc0 Removed usage of (deprecated) new Buffer (#2531) 2018-05-03 19:07:16 +02:00
dependabot[bot]
21cc2952eb build: update @types/node requirement to ^10.0.3 (#2532)
Updates the requirements on [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped) to permit the latest version.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-05-03 19:03:42 +02:00
Kyra
a89de09855 fix(RESTMethods): remove listener from correct event (#2534) 2018-05-03 17:56:10 +02:00
Kyra
62605c4470 feat(DiscordAPIError): add method property (#2530) 2018-05-03 08:01:27 +02:00
bdistin
17d2c2efb8 docs(Collection): fix spelling of 'behavior' (#2529) 2018-05-03 08:00:56 +02:00
Lewdcario
f293dddc29 fix: Webhook#edit attempting to use client.channels always 2018-05-02 21:19:00 -05:00
Amish Shah
bd83bb9fd6 refactor: improve sweep performance 2018-05-02 18:09:51 +01:00
Amish Shah
27a0f48441 refactor: tidy up _inactive check 2018-05-02 18:04:47 +01:00
Amish Shah
b5f37728a7 feature: allow sweeping of inactive request buckets 2018-05-02 17:57:48 +01:00
SpaceEEC
a85d801a12 fix(ClientUser): setActivity should resolve with a Presence 2018-05-01 20:27:05 +02:00
Lewdcario
745669a7c9 docs: consistency 2018-04-29 13:28:12 -05:00
Amish Shah
5f50d9e627 voice: backport null key fix 2018-04-29 18:53:50 +01:00
Frangu Vlad
5acf4061e8 fix: GuildMember#toJSON not having roles (#2520) 2018-04-29 11:28:45 -05:00
Kyra
934e90b921 fix: Added everyone role to GuildMemberRoleStore#_filtered (#2514)
* Added everyone role to GuildMemberRoleStore#_filtered

* Changed to Guild#defaultRole
2018-04-28 13:40:24 -05:00
SpaceEEC
33a4232652 fix(OpusEngineLinst): throw a descriptive error when not funding an opus engine 2018-04-28 14:30:14 +02:00
SpaceEEC
d9a091f674 feat(SnowflakeUtil): allow snowflakes to be generated dynamically 2018-04-27 20:34:48 +02:00
SpaceEEC
44fefdfa49 fix(Util): reject with a meaningful error instead of throwing one 2018-04-27 20:16:46 +02:00
Amish Shah
0eb6409504 voice: remove krypton submodule 2018-04-27 15:45:53 +01:00
Amish Shah
b05622766b voice: start using provided IP rather than manually resolving 2018-04-27 15:25:05 +01:00
Amish Shah
299fc001d5 voice: start using provided IP rather than manually resolving 2018-04-27 15:11:37 +01:00
Isabella
49ad8cc2cc feat(GuildChannel): add manageable getter (#2439)
* Adds GuildChannel.manageable

* Resolve requested changes

* fix eslint max-len error

* Fix for nullable permissionsFor()

* Indent fixes
2018-04-26 01:31:52 -05:00
bdistin
7b9e84dff5 feat(Guild): add mfaLevel property (#2451) 2018-04-26 01:28:59 -05:00
Lewdcario
384e96d51e backport: docs improvements 2018-04-26 01:25:44 -05:00
Isabella
d7e7803178 docs: (backport) Bring the main doc pages up to date, and add more examples (#2094) 2018-04-26 01:13:44 -05:00
Lewdcario
64caa33594 fix: GuildEmoji#clone 2018-04-25 18:42:51 -05:00
Lewdcario
30d43efa54 fix: GuildMemberRoleStore#remove 2018-04-25 18:01:28 -05:00
Daniel Odendahl Jr
95b531742a fix: TypeError in mixin function (#2506) 2018-04-24 18:35:07 -05:00
Isabella
8b83553462 refactor: role stores (#2478)
* refactor: reduced duplication in role stores

* fix docs

* fix: typo

* most of requested changes

* rest of changes

* ACTUAL rest of changes

* docs

* doooocs

* reason
2018-04-24 15:52:00 -05:00
Jacz
e12ab7428f fix(MessageEmbed): correct docs, default to array, resolve MessageAttachments (#2492)
* Fix(MessageEmbed): Remove useless for...of & change this.files to be out of the data.files check...

* Requested changes
2018-04-23 19:38:56 +02:00
Kyra
b186472785 Added a note in userUpdate event (#2479) 2018-04-21 21:45:15 +02:00
Lewdcario
b8a9a76cf6 docs: inconsistencies 2018-04-20 21:10:21 -05:00
bdistin
feb0991c46 fix: use Object.keys instead of Object.values for node 6 (#2487) 2018-04-20 21:11:27 +02:00
Faith
c9c2d66971 feat(GuildChannelStore): add topic to create options (#2488)
The API provides the ability to send the topic, or description, of the channel within the creation post. Discord.js will now send it if its provided.
2018-04-20 19:11:46 +02:00
SpaceEEC
ff671b2f3c fix(RestMethods): typo timeout -> timed 2018-04-19 13:53:44 +02:00
SpaceEEC
b60ee25038 fix(MessageEmbed): avoid throwing error when accessing colorless hexColor 2018-04-19 13:14:20 +02:00
SpaceEEC
3ba26ad972 fix(Message): do not update editedTimestamp when there is none in the payload
Fixes #2307
2018-04-19 13:13:50 +02:00
SpaceEEC
de78a8d0b4 fix(RESTMethods): verify correct member in add and remove role listeners
Fixes #2480
2018-04-19 13:13:28 +02:00
SpaceEEC
7c37a0d386 fix(MessageDeleteBulkAction): remove bulkDeleted messages from cache
Fixes #2382
2018-04-19 11:50:30 +02:00
Lewdcario
c387e96078 fix: Client#generateInvite resolving permissions incorrectly 2018-04-18 20:30:24 -05:00
Lewdcario
8d065fa043 fix: Client#generateInvite resolving permissions incorrectly 2018-04-18 20:25:49 -05:00
Lewdcario
ec9211c3ce docs: inconsistencies 2018-04-18 20:21:17 -05:00
Lewdcario
7c0b6173dd fix: Role#setPermissions resolving & docs 2018-04-18 19:57:16 -05:00
Lewdcario
92b421607e fix: GuildChannel#setTopic not nullable 2018-04-18 19:35:28 -05:00
iDroid
f3ae7fd638 Fixed JSDoc owner thing (#2473)
Added a `?` before `GuildMember`, the `owner` property may be undefined in some cases.
2018-04-18 19:25:28 -05:00
Suvan
2dd7fd2739 docs(GroupDMChannel): fix grammar an user -> a user (#2482) 2018-04-17 18:24:48 +02:00
SpaceEEC
f6216f3905 feat(SnowflakeUtil): allow snowflakes to be generated dynamically (#2459) 2018-04-17 09:00:18 -05:00
bdistin
8551b8936c docs: fix a number of spelling mistakes (#2469) 2018-04-13 20:50:47 +02:00
Pascal
6069061fee chore: update typings submodule 2018-04-13 19:50:59 +02:00
sekwah41
6e5b674338 Fixed updateChannel being too protective (#2460)
If I am not mistaken the only way atm to remove a channels parent atm is to do this to get the null value through the code.

channel.client.rest.methods.updateChannel({id:channel.id, name:channel.name,
            topic:channel.topic,position:channel.position,
            bitrate:channel.bitrate,userLimit:channel.userLimit,parent:{id:null}}, {});

This fixes the method allowing channel.setParent(null); to work
2018-04-13 14:03:18 +02:00
Frangu Vlad
61ad9475de fix(ClientManager): patch ClientUser's presence with ClientOption's one (#2458) 2018-04-13 08:27:53 +02:00
Crawl
f2474845ba fix: webpack building and upgrading to webpack 4.5 2018-04-11 13:49:42 +02:00
Amish Shah
cb69102e5e voice: allow for changing volume with webm/ogg streams 2018-04-10 21:19:29 +01:00
Jérémie N'gadi
e845758037 fix(StreamDispatcher): only update speaking for non broadcasts (#2437)
If the player is a BroadcastAudioPlayer it has no VoiceConnection directly associated with it.
2018-04-09 21:17:16 +02:00
Schuyler Cebulskie
952a7123f3 Add missing word in Shard#respawn docblock 2018-04-09 14:35:49 -04:00
Pascal
b955a514f6 fix(Guild): remove member's voice state on guildMemberRemove
fixes #2430
2018-04-09 17:43:07 +02:00
bdistin
b3ff7c728e feat(Guild): add mfaLevel property (#2451) 2018-04-09 09:56:48 +02:00
bdistin
2bf68dcdfb docs(GuildStore): correct warning for create method (#2453)
Bots may create guilds if they are in less than 10 guilds.
2018-04-09 09:56:25 +02:00
Frangu Vlad
f985b6bef3 fix(Role): allow edit method to null the color (#2447) 2018-04-09 09:54:40 +02:00
Amish Shah
ef138fd3e9 voice: fix #2380 (voiceSessionID null after changing server region) 2018-04-07 15:29:38 +01:00
Amish Shah
fa886eaae9 voice: fix bug where no audio could be heard if voice region changed 2018-04-07 15:19:18 +01:00
Amish Shah
384fdf8f17 voice: properly cleanup after disconnect (#2443, #2435, #2421, #2406 #2359) 2018-04-07 14:40:05 +01:00
Amish Shah
41d0f25d0f voice: fix heartbeat issue (#2443) 2018-04-05 16:38:35 +01:00
Pascal
e431ccdad2 fix(GuildChannel): always return a boolean from the manageable getter
Overlooked the comment pointing that out in #2439
2018-04-02 20:52:12 +02:00
Favna
ef4bd92c8a feat(GuildChannel): add manageable getter (#2439)
* Adds GuildChannel.manageable

* Resolve requested changes

* fix eslint max-len error

* Fix for nullable permissionsFor()

* Indent fixes
2018-04-02 20:00:47 +02:00
Amish Shah
a5e8f05d01 voice: add end param to describe how a voice receive stream should end 2018-03-31 11:52:48 +01:00
Schuyler Cebulskie
623d4c0076 Add deploy exception for dependabot branches 2018-03-25 15:14:18 -04:00
Will Nelson
b5b436f9cb Revert "fix message embed json serialization (#2420)"
This reverts commit c40488eb54.
2018-03-24 18:47:15 -06:00
Will Nelson
c40488eb54 fix message embed json serialization (#2420)
* fix message embed json serialization

remove the toJSON method on message embeds so the raw data is exposed
for JSON seralization. this removes the hexColor property, but it
probably should not have been there in the first place. fixes #2419

* change api transform to tojson
2018-03-24 19:43:56 -05:00
Lewdcario
4e0e64d8a1 fix(MessageReaction): inaccurate count
also works towards async rewrite goal
fixes #2404
2018-03-24 15:22:21 -06:00
Pascal
d041cb2460 fix(GuildEmojiRoleStore): do not prematurely patch roles
Issue is the same as in #2312 and #2381, but for the GuildEmojiRoleStore.
Thanks to @KingDGrizzle for pointing this out.
2018-03-16 20:01:43 +01:00
bdistin
acd1740f0b docs: fix missing parameter type/description from #2193 (#2396)
* docs: Fix missing parameter type/description from #2193

* requested changes
2018-03-15 06:52:23 +01:00
Amish Shah
ef8366d189 voice: properly null-check udp socket first (#2317) 2018-03-13 09:48:18 +00:00
Pascal
513dbf2f68 fix(MessageReaction): do not increment count twice for own user
Fixes #2389
2018-03-10 14:11:33 +01:00
Pascal
0f7ce3f720 fix(GuildemojiStore): allow resolving of external ReactionEmoji 2018-03-10 14:08:59 +01:00
bdistin
630009f3cf fix: Convert lastMessage to getters (#2384)
* convert lastMessage to getters

* fix bug in pr

* requested changes
2018-03-08 10:19:43 -06:00
bdistin
799eea957e consistency: getters return null instead of undefined (#2385) 2018-03-08 10:15:06 -06:00
Lewdcario
a68f14500d fix: GuildMemberStore: unban returns user
fixes #2388
2018-03-08 10:08:59 -06:00
Pascal
85413481ed fix(DataResolver): always resolve with buffer when resolving urls
Fixes: #2379
2018-03-06 21:48:34 +01:00
Amish Shah
79b02dd35f voice: resolve "cb is not a function" error (#2317) 2018-03-06 10:36:05 +00:00
Amish Shah
8289b70e2c voice: resolve issue where dispatcher tried to send packets to null socket (#2317) 2018-03-06 10:21:44 +00:00
Amish Shah
835bff74cd lint: remove unused import 2018-03-05 20:17:38 +00:00
Amish Shah
ff825cd8b8 voice: fix #2331 (speaking not set back to false on stream ending) 2018-03-05 19:41:35 +00:00
Amish Shah
399d179ebc Merge branch 'master' of https://github.com/hydrabolt/discord.js 2018-03-05 19:30:21 +00:00
Amish Shah
e263063ba6 voice: update prism and fix framesize to work for opusscript 2018-03-05 19:30:18 +00:00
Pascal
3e6c3107c2 fix(GuildMemberRoleStore): make remove role remove roles again 2018-03-05 14:50:59 +01:00
Pascal
3f6a0e4de1 fix(GuildMemberRoleStore): only update roles after successful request
Fixes #2381
2018-03-05 11:32:03 +01:00
Amish Shah
e5bd6ec150 11.3.2 2018-03-04 18:08:54 +00:00
Gus Caplan
c8f78b2bf0 fix(ws): set correct ratelimit remaining after reset or destroy (#1806) 2018-03-04 12:44:31 +01:00
Jonah Snider
8b679913a4 docs: Change 'the this' to this (typo) (#2377) 2018-03-04 08:16:12 +00:00
Isabella
0a951cfc0f docs: TextChannel Webhooks fix&improvement 2018-03-03 18:55:54 -06:00
Schuyler Cebulskie
419a2eea3f Bump version to 11.3.1 2018-03-03 15:38:24 -05:00
Schuyler Cebulskie
a3cec3bc1f We must not be like Todd Howard 2018-03-03 15:36:59 -05:00
Isabella
b637c9c220 feat: allow multiple permission overwrites when editing channel (#2370)
* feat: allow multiple permission overwrites when editing channel

* undo Permissions#resolve change
2018-03-03 11:18:58 -06:00
Pascal
ca054affc7 chore: update typings submodule 2018-03-03 12:00:05 +01:00
Frangu Vlad
069dccfa3b docs: document the messages property for all TextBasedChannels (#2373)
* Document TextChannel#messages

* Same for DMChannels

* And GroupDMChannels
2018-03-03 11:04:33 +01:00
iCrawl
ad93b90cd9 update typings 2018-03-03 02:53:24 +01:00
Lewdcario
8f9e911b5f fix: RichEmbed timestamp cloning 2018-03-02 18:52:43 -06:00
Lewdcario
363ead922a fix: bulkDelete discarding non-cached messages 2018-03-02 12:17:10 -06:00
Will Nelson
cf7dcba1a5 Add toJSON methods (#1859)
* tojson things

* fix client

* ignore private properties

* remove extra property descriptors

* handle primitive flattening

* remove unused import

* add toJSON to collections

* reduce stateful props

* state

* allow custom prop names when flattening

* fix client

* fix build

* fix flatten docs

* remove guild.available, cleanup permissions, remove arbitrary id reduction

* fix util import

* add valueOf as needed, update member props

* fix incorrect merge

* update permissionoverwrites and permissions

remove serialization of permissions in PermissionOverwrites#toJSON.
change Permissions#toJSON to serialize permissions, by default excluding
admin checks.

* change Permissions#toJSON to return the primitive

* Permissions#toJSON explicitly return bitfield
2018-03-01 23:00:21 -06:00
Lewdcario
24571e465b docs: examples & improvements 2018-03-01 22:50:45 -06:00
Lewdcario
96e88f3cef docs: incorrect returns 2018-03-01 22:38:55 -06:00
Lewdcario
fcdffcf623 docs: improvements & examples 2018-03-01 20:47:18 -06:00
Lewdcario
acdf43a872 fix: GuildAuditLogs using Guild#fetchInvites 2018-03-01 20:37:19 -06:00
Lewdcario
38f5288be8 docs: Message#type 2018-03-01 20:12:14 -06:00
Lewdcario
f64e924f0d fix: export CategoryChannel 2018-03-01 20:09:05 -06:00
Pascal
f2c5714751 fix(StreamDispatcher): remove gratuitous parentheses 2018-03-01 19:12:15 +01:00
Lewdcario
9b41a6a8a6 fix: re-add highest property to RoleStore and GuildMemberRoleStore
closes #2302
2018-03-01 11:52:29 -06:00
FireController1847
ced93fe826 Specify that Client#uptime is "in milliseconds" (#2288) 2018-03-01 18:25:17 +01:00
Gus Caplan
7f5c1038db fix websocket ratelimits (#2014) 2018-03-01 18:25:00 +01:00
Gus Caplan
af75e43900 proper fix for #1685 (#1805)
* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update RESTManager.js
2018-03-01 17:50:07 +01:00
Will Nelson
2a9fdef9e5 add valueOf method to permissions (#2363) 2018-02-28 16:48:06 +01:00
Pascal
464fc14edd fix(Activity): ensure that timestamps are actually numbers
Fixes #2364
Discord sends those timestamps packed as SMALL_BIG_EXT, which get converted to strings in js.
~~Maybe they are already preparing their timestamps for 2038.~~
2018-02-28 09:31:42 +01:00
Frangu Vlad
9f8925226d docs(WIP): Bring the main doc pages up to date, and add more examples (#2094)
* Bring some docs up to date, as well as add a new example

* Missed an exclamation mark

* Do requested changes

* Do suggestions

* Same suggestions for the other examples

* Show people that they can also use reply with embeds

* Typos in embed.js example

* Remove object example from embeds, too complex
Suggested by Yukine

* Some changes, some requested changes

* Add moderation examples!

* Add attachment examples

* Missing dot

* Fix spacing

* Requested Changes

* Quote consistency

* Tfw you break the syntax
2018-02-27 20:04:53 -06:00
Lewdcario
b79722a77b docs: remove trailing commas 2018-02-27 17:43:51 -06:00
Lewdcario
2b24b10246 docs: trailing commas 2018-02-27 11:13:56 -06:00
Isabella
af3517594f docs: improvements 2018-02-27 10:43:31 -06:00
Pascal
c6f92c1bc5 fix: if present, wait for libsodium-wrappers' ready to support v0.7.3 2018-02-26 11:35:51 +01:00
rei2hu
35babc706d Fix: discord sort method (#2355) 2018-02-23 21:18:42 -06:00
nekobako
c25ea45866 fix(StreamDispatcher): emit volumeChange event when the volume changes (#2349) 2018-02-21 22:21:13 +01:00
Kyra
b7851bad37 perf(Collection): Performance improvements (#2342)
* Update Collection.js

* ESLint
2018-02-21 22:03:40 +01:00
Sanctuary
0ec53c9d6f docs: Add links for the guide (#2346) 2018-02-21 21:42:35 +01:00
Pascal
dc92582eb4 fix(ReadyHandler): don't create new guild instances for already existing guilds
See: #2319, #2332
2018-02-21 21:41:02 +01:00
Sanctuary
dc6bce1f82 docs: Add links for the guide (#2346) 2018-02-21 09:44:11 +01:00
Ecstabis
3a3ca96b0d Added 2 basic role colors PINKISH_PURPLE and DARK_PINKISH_PURPLE (#2303)
* Added 2 basic role colors PINKISH_PURPLE and DARK_PINKISH_PURPLE

* Added documentation for added Colors PINKISH_PURPLE and DARK_PINKISH_PURPLE

* fix colour names

* docs
2018-02-20 16:51:03 -06:00
Pascal
05c5bdc476 fix(StreamDispatcher): do nothing when resume is called when not paused
Fixes #2324
2018-02-19 18:17:51 +01:00
Pascal
be40858e32 chore: update typings submodule 2018-02-19 16:26:30 +01:00
Pascal
77dc3aafaa chore: update typings submodule 2018-02-19 16:11:49 +01:00
iCrawl
5454a074ee revert: changes to node 8 2018-02-17 18:19:56 +01:00
iCrawl
2254a3ee11 fix: build with node 8 2018-02-17 18:13:01 +01:00
iCrawl
da14e33ff7 fix: add node 8 to build 2018-02-17 18:11:28 +01:00
iCrawl
a7b46be923 fix: webpack minified and bump deps 2018-02-17 18:01:20 +01:00
Kyra
a8172951d3 perf(Collection): Performance improvements (#2342)
* Update Collection.js

* ESLint
2018-02-16 10:19:30 +01:00
iCrawl
e6dfa38c85 chore: update typings(?) 2018-02-16 10:07:59 +01:00
iCrawl
5583e70eb6 fix: properly fix minified builds 2018-02-16 09:55:30 +01:00
iCrawl
1b9af41fbb chore: update test 2018-02-16 09:55:22 +01:00
iCrawl
0c285e784f Merge branch 'devsnek-refactor/webpacks' 2018-02-16 09:52:27 +01:00
Crawl
d720ad6334 Merge branch 'master' into refactor/webpacks 2018-02-16 09:48:54 +01:00
iCrawl
8e60743c0b fix: dont require snekfetch supplemental because they are not a thing anymore 2018-02-16 08:54:49 +01:00
iCrawl
332558a3d8 fix: npm scripts 2018-02-16 08:46:31 +01:00
iCrawl
672f93f5bd chore: bump deps and remove unneeded ones 2018-02-16 08:43:46 +01:00
Pascal
5cf8a634f8 chore: update typings submodule 2018-02-13 17:54:52 +01:00
Lewdcario
40a2f093aa fix(VoiceChannel): setUserLimit defaulting to wrong value 2018-02-13 10:43:38 -06:00
Pascal
2fd4c6def7 chore(deps): update uws to 9.14.0
Closes #2327
2018-02-13 17:40:43 +01:00
SpaceEEC
47bc0fc51e feat(GuildChannel): add fetchInvites method (#2339)
* feat(GuildChannel): add fetchInvites method

* fix: actually use the 'channels' endpoint
2018-02-13 17:29:42 +01:00
David Siaw
8ee2788baf fix(StreamDispatcher): properly check that timestamp fits in 2^32-1 (#2325)
* fix a very strange bug caused by massive timestamps sent to discord

* remove 'gratituous' spaces
2018-02-11 08:35:46 +01:00
Isabella
66c0512de2 feat(ShardClientUtil#broadcastEval): allow promise resolve (#2328) 2018-02-07 11:07:59 -05:00
Pascal
3df3741922 backport/fix(GuildDelete): disconnect voice and cleanup GuildChannels 2018-02-05 13:03:43 +01:00
Pascal
96904b1826 fix(AudioPlayer): add opus to destructured key of stream options
This fixes #2079 (VoiceConnection#playOpusStream being broken)
2018-02-05 10:42:47 +01:00
Sanctuary
87e5a45659 feat(ClientOptions): add support for setting an initial presence (#2320)
* docs/feat(WebsocketOptions): Parse ws options presence

Allow the `presence` property in `WebsocketOptions` to be used the same way
as `ClientUser#setPresence`.

* Move presence options to top level
2018-02-04 21:32:45 +01:00
Snazzah
43363172c2 docs: Add TypeDef for MessageActivity (#2321) 2018-02-04 20:44:13 +01:00
Frangu Vlad
e0cbf0bb60 feature: add GuildEmoji#fetchAuthor (#2315)
* Make the base code

* Fxi lint
2018-02-02 20:34:21 +01:00
Gus Caplan
bd1bf11ed0 spotify stuff (#2314) 2018-02-02 12:45:18 -06:00
Lewdcario
234648bd2a fix(ClientApplication): createAsset incorrectly resolving image and posting 2018-02-02 11:41:08 -06:00
SpaceEEC
016526486c enhancement(Activity): add toString method (#2313) 2018-02-01 18:41:05 -06:00
Lasse Niermann
31873eb3a5 docs(ClientUser): mark email field as user account only property (#2306)
* Store Mail - User Account Only

Added that info

* docs(ClientUser): mark email field as nullable
2018-02-01 20:29:20 +01:00
Lasse Niermann
1f14758e0c docs(ClientUser): mark email field as user account only property (#2306)
* Store Mail - User Account Only

Added that info

* docs(ClientUser): mark email field as nullable
2018-02-01 20:06:59 +01:00
Pascal
32e2dd212e fix: add clone methods to GuildMember and GuildMemberRoleStore
Fixes #2312
This adds clone method to both classes to achieve the expected behaviour when cloning a GuildMember, also cloning their roles store
2018-01-31 21:04:15 +01:00
Isabella
9810bdbc5f fix(MessageEmbed): remove length checks (#2304)
* fix(MessageEmbed): remove length checks

* update error messages
2018-01-29 10:56:55 -06:00
Lewdcario
d46eec4da4 fix(resolveColor): not interpreting DEFAULT correctly 2018-01-28 22:34:50 -06:00
Lewdcario
52c402faea fix(resolveColor): not interpreting DEFAULT correctly 2018-01-28 19:04:55 -06:00
Lewdcario
2e0048add1 docs: doc changes 2018-01-27 23:41:25 -06:00
Lewdcario
d93d628f19 make Message#member a getter 2018-01-27 17:04:03 -06:00
Gus Caplan
711bcc7a7c Update webpack.config.js 2018-01-27 12:56:45 -06:00
Dim
10f98d8e57 use String#padStart for Role#hexColor (#2294) 2018-01-27 07:42:49 +01:00
Pascal
8c288b56a2 chore: update typings submodule 2018-01-26 09:25:30 +01:00
Lewdcario
bd154bdd9e fix: nullable activity 2018-01-25 02:06:28 -06:00
Alex
e58ff642f5 Make Util#splitMessage handle edge cases properly (#2212)
* Make Util#splitMessage handle edge cases properly

* Restart Travis

* Set maxLength to 2000 + small tweak
2018-01-24 23:41:50 -06:00
Faith
58d85282b4 Fix Destructuring Errors in Util (#2171)
* Fix Destructuring

* Fix another one
2018-01-24 17:37:41 -06:00
Lewdcario
7e0e457334 fix(ClientUser#setStatus): resetting activity
The method would pass in null if no activity was passed, so this takes the current client presence instead of deleting it.
2018-01-24 15:09:40 -06:00
Frangu Vlad
a832b56469 GuildEmoji: Move all role related functions to a separate store (#2271)
* Prepare to work on moving all role functions to a Store

And yes, this is *another* patch branch cause I messed up my master branch to hell

* Move all emoji role related functions to its own store
Tested everything and it works! (With a reload of the client)
Also had to change a value in DataStore#holds
holds.name for GuildEmojis would return the emoji name instead of the class name

* New Line

* Thanks JS for circular dependency!
Because we can't have nice things...

* Do space's request

* Fix equals

* Fix space's point.

Raw API data has the role property as an array of IDs
2018-01-24 20:47:20 +01:00
Lewdcario
e978253896 fix(Webhook#send): incorrect docs + return
Two things:
* Documentation doesn't account for possible raw object return
* Allows the return to be a Message object as well, like the docs originally intended
2018-01-24 13:06:05 -06:00
Dragon Fire
16b5de5d52 fix(Role) Update usages of highestRole#comparePositionTo to use GuildMemberRoleStore (#2289) 2018-01-24 13:34:11 +01:00
Pascal
048e147497 fix(RoleStore): create method is supposed to take an options object 2018-01-24 09:02:37 +01:00
FireController1847
92c9f8864c Specify that Client#uptime is "in milliseconds" (#2288) 2018-01-24 08:24:24 +01:00
Frangu Vlad
00172e6c7d refactor: Move member role-related functions to a special store (#2242)
* Ignore this I need a patch branch for Git

* Move all member role related stuff to a new DataStore
GuildMemberRoleStore is a new store that holds all member role related stuffs
Because its consistent!

* Minorest doc fix ever
To whoever did this object, they forgot a `{`

* Fix the spacing in the docs

* Resue the stores resolve rather than copy paste
Cause I'm dum and it overwrite resolve to the guild role stores resolve soo

* Fix some requests
- Removed the bs private functions
- Set the roles in the constructor

But, I need feedback. There is no way, that I saw, to make a member have roles whenever GuildMmber#_patch is called,
due to the roles being null on the guild. So the only way might be the for loop and getter.

* Fix an issue that I caused in #add
I was testing some other things, and changed that to test. Forgot to change it back

* Actually make the store generate just once when the member is created by first initializing the roles in the guild
Also replaces GuildMember#_roles with GuildMemberRoleStore#_roles
Tested all functions to make sure the expected result happens.

* I missed this from moving remove from GuildMember to GuildMemberRoleStore

* Fix RoleStore#create docs
For real this time

* Do all the requested changes
- Rename all `somethingRole` to `something` (hoistRole => hoist)
- Refactor add and remove to be cleaner and re-use set

* Fix a bug where the store would loose some roles due to null roles that can throw an error in the for loop after they've been deleted

* Remove the `role.id || role` part of the add and remove functions as Appel suggested

* Replace roles.resolve with roles.resolveID for GuildMemberRoleStore#remove

* Don't use Array.isArray in checks
Use instanceof instead

* Woops, I forgot to change this
Renamed colorRole to color

* The docs have dots, so we place the dots back
2018-01-24 08:12:58 +01:00
Pascal
5352e28700 chore: update typings submodule 2018-01-23 07:27:39 +01:00
Pascal
07c48a6845 fix: require discordjserror to throw meaningful errors where necessary 2018-01-22 20:23:36 +01:00
Pascal
8df1ac9920 fix(startTyping): return, to not overwrite already existing entries 2018-01-22 14:09:27 +01:00
Amish Shah
86da7af4f1 Update prism dependency 2018-01-21 17:47:26 +00:00
Cat
8a2ace45d8 docs: fix VoiceBroadcast documentation (#2277) 2018-01-21 18:23:23 +01:00
Michel Nguyen
edc4e2b751 docs: fix streamdispatcher documentation (#2275)
* docs change

* fix streamdispatcher documentation

Signed-off-by: Michel Nguyen <modzongaming@gmail.com>

* fucks sake

Signed-off-by: Michel Nguyen <modzongaming@gmail.com>

* typings

Signed-off-by: Michel Nguyen <modzongaming@gmail.com>

* typings again 👀

Signed-off-by: Michel Nguyen <modzongaming@gmail.com>
2018-01-21 18:23:00 +01:00
Amish Shah
83de7c0d4c Fix error messages 2018-01-21 15:52:32 +00:00
Pascal
3300e39690 chore: update typings submodule 2018-01-21 13:12:31 +01:00
Amish Shah
76891a1e00 try fix 2018-01-21 10:34:14 +00:00
Amish Shah
aa09490724 whoops 2018-01-21 10:31:12 +00:00
Amish Shah
b2708a6fa8 Merge branch 'master' of https://github.com/hydrabolt/discord.js 2018-01-21 10:29:06 +00:00
Amish Shah
0e262ea8d7 More informative stream errors 2018-01-21 10:29:03 +00:00
Pascal
93e083da4f fix(Guild): memberCount not decrementing when an uncached member leaves
This leads to GuildMemberStore#_fetchMany to always reject
because it expects more member than possible.

Also no longer call the GuildMemberRemove handler locally
to not decrement twice.
2018-01-21 07:30:59 +01:00
Cynthia Lin
00e2f39ea1 fix(client#voiceConnections): Incorrect docs description (#2280) 2018-01-20 22:09:39 -06:00
Pascal
b5ff309bf9 fix(CategoryChannel): set the type to 'category' and document its type 2018-01-20 23:27:18 +01:00
Kyra
986e6da196 Fix(GuildChannel#clone) options.parent not accepting (falsy) null. (#2262)
* Fixed (falsy) options not being set correctly

* Requested changes.

As a side note, I also default `options.withPermissions` for simplicity, and because it gets ignored in [`GuildChannelStore#create()`](https://discord.js.org/#/docs/main/master/class/GuildChannelStore?scrollTo=create).

* Fixed the overwrites option
2018-01-20 19:30:30 +01:00
Amish Shah
b16e6f8262 Fix VoiceBroadcast#play documentation 2018-01-20 16:57:27 +00:00
Amish Shah
f728d2be69 Update voice docs 2018-01-20 16:31:34 +00:00
Amish Shah
ac65ea41b4 Update voice docs 2018-01-20 16:26:44 +00:00
Amish Shah
f588b3fd20 Merge branch 'master' into voice-rewrite 2018-01-20 13:50:34 +00:00
Amish Shah
c63bdb5fb1 Remove redundant doc tag descriptions 2018-01-20 13:47:35 +00:00
Amish Shah
ca96e1478a Make docs technically correct 2018-01-20 13:45:22 +00:00
Amish Shah
791740220e Improve docs, allow for webm/opus demuxing and playing broadcasts without specifying a type 2018-01-20 13:01:48 +00:00
Amish Shah
f14193b93a Document examples 2018-01-20 12:48:28 +00:00
Pascal
fbd25f8677 fix(GuildMember): make edit method only modify a copy of the voice state
This is to fix stale members in voice channels.
2018-01-20 12:44:27 +01:00
Pascal
a22b856494 fix(WebSocketConnection): make errors in event handlers throw again
The error from something like client.on('ready', () => undefined.f);
would just be emitted as debug event instead of being thrown.

Simply moving the emitting part out of the try catch again solves this.
2018-01-20 09:05:07 +01:00
Yukine
bf0a68dbac Mark DataStores as public to directly display them in the docs. (#2268)
* make EmojiStore not Private anymore.

because why have something private if there is priority functionality on that class? also that causes that the docs wont show it directly

* make GuildChannelStore not private anymore

because why have something private if there is priority functionality on that class? also that causes that the docs wont show it directly

* make RoleStore not private anymore

because why have something private if there is priority functionality on that class? also that causes that the docs wont show it directly

* make ReactionStore not private anymore

because why have something private if there is priority functionality on that class? also that causes that the docs wont show it directly

* make all non private to stay consistent

* fix merge conflicts because of other PRs.
2018-01-20 08:00:44 +01:00
Amish Shah
ef02bd2935 Add stubs for docs 2018-01-20 00:05:37 +00:00
Amish Shah
2b5fc77a67 Rudimentary support for unified audio playing! 🎉 2018-01-19 23:55:59 +00:00
Amish Shah
8e5e1ad8fe Document Receiver 2018-01-19 23:03:01 +00:00
Amish Shah
c57c2889b7 Fix import errors for networking classes 2018-01-19 22:54:54 +00:00
Amish Shah
066fbfe330 Move voice UDP client and Websocket client to networking folder 2018-01-19 22:53:55 +00:00
Amish Shah
60c5c1486b Remove dead files 2018-01-19 22:51:53 +00:00
Amish Shah
c6c9c0918a Fix PacketHandler runtime error (EventEmitter not imported) 2018-01-19 22:51:26 +00:00
Amish Shah
cb161a8a40 Implement Receiver debug events 2018-01-19 22:47:01 +00:00
Amish Shah
83140f11b7 Fix ESLint and inline the voice readable stream 2018-01-19 22:41:31 +00:00
Amish Shah
dd618584d0 Simplify VolumeInterface constructor 2018-01-19 22:38:39 +00:00
Amish Shah
4a1b55d145 Receiver#createStream should take options 2018-01-19 22:38:10 +00:00
Amish Shah
2c1a302eea Redesign voice receiving, still needs cleaning up 2018-01-19 21:14:03 +00:00
Amish Shah
6058ea4888 Start voice receive rewrite 2018-01-19 17:45:37 +00:00
Amish Shah
580bda46ea Fix documentation for VoiceBroadcast (play methods return BroadcastDispatcher not StreamDispatcher) 2018-01-19 14:40:58 +00:00
Amish Shah
3b1c5d3494 Expose VoiceBroadcast#dispatcher so that the broadcast can be controlled 2018-01-19 14:39:51 +00:00
Amish Shah
e7375aa0fd Reimplement broadcast (un)subscribe events 2018-01-19 14:32:51 +00:00
Amish Shah
3d3c436e92 Merge branch 'master' into voice-rewrite 2018-01-19 14:06:41 +00:00
Schuyler Cebulskie
6e10d258b6 Tweak readme and docs welcome page 2018-01-18 20:16:59 -05:00
Schuyler Cebulskie
e9bdd3ad7e Tweak readme and docs welcome page 2018-01-18 19:59:21 -05:00
Schuyler Cebulskie
f649610c26 Merge branch 'master' into voice-rewrite 2018-01-18 19:49:23 -05:00
Schuyler Cebulskie
95d35a9efa Update typings submodule URL 2018-01-18 19:48:43 -05:00
Schuyler Cebulskie
aafb291ce2 Update typings submodule URL 2018-01-18 19:45:04 -05:00
Schuyler Cebulskie
16a910c988 Update repository references 2018-01-18 14:46:35 -05:00
Schuyler Cebulskie
51ddd6595c Update repository references 2018-01-18 14:40:02 -05:00
Schuyler Cebulskie
bb8ed98a85 Merge remote-tracking branch 'origin/11.3.1-dev' into 11.3-dev 2018-01-18 14:32:36 -05:00
Amish Shah
c49c5576d0 Point discord.js-docgen dependency to its new location 2018-01-18 17:56:46 +00:00
Amish Shah
c522b65adb Point discord.js-docgen dependency to its new location 2018-01-18 17:54:45 +00:00
MaySoMusician
8cbefcc081 [v11.3.x] Fix param to setPresence in setActivity (#2270)
ClientUser#setPresence in master branch (latest) calls client.presences.setClientPresence, but that in v11.3 does not
so i change parameter sent to setPresence for clearing the game activity, from activity:null to game:null,
for now until setPresence gets updated
2018-01-18 02:39:54 -06:00
SpaceEEC
aa3407f705 Base Emoji class for ReactionEmoji and renamed GuildEmoji classes (#2230)
* feat: create base Emoji class for ReactionEmoji and new GuildEmoji

* rename EmojiStore to GuildEmojiStore to account for the new class' name
2018-01-18 02:38:45 -06:00
bdistin
b846cbd2b3 GuildChannel.permissionsFor(role) (#2254)
* GuildChannel.permissionsFor(role)

* 1Comp's requested changes
2018-01-18 02:28:14 -06:00
John Leuenhagen
d5b0cf9ffb Permissions improvements (#2126)
* add Permissions.toArray()

* accept Permissions objects to Permissions.missing()

* accept Permissions as parameter to Permissions.has()

* style fixes

* remove redundant line, update JSDoc for Permission.resolve()

* JSDoc, style, and checkAdmin fixes

* add Permissions.resolveToObject()

* accept PermissionResolvable to Permissions.missing()

* remove `resolveToObject`, fix constructor JSDoc

* remove redundant parameter type

* fix `Permissions.missing()`

* fix checkAdmin

* update Permissions.toArray() description

* eliminate ambiguity in Permissions.toArray() description

* add backticks to permission example

* remove irrelevant type in Permission ctor description

* use this.constructor to properly support OOP

* use simplified approach for Permissions.toArray()

* fix return type on Permissions.toArray()

* move `Permissions#toArray` to more suitable position

* bitwise approach to `Permissions#missing`

* allow `Permissions` to be iterated over

* don't checkAdmin on return array

* remove unnecessary conditional

* fix JSDoc indentation

* use simpler & more reliable approach for missing()

* update PermissionResolvable typedef
2018-01-18 02:17:50 -06:00
Artful
1db0906483 Client method examples. (#2264)
* Client method examples.

* Consistency

* As per hydras request 🙇

* Thanks kya
2018-01-18 07:47:05 +01:00
Michel Nguyen
19591b0bb1 docs: fix attachFiles() docs (#2267)
* docs change

* fix attachFiles docs

* why was this still here
2018-01-18 07:42:05 +01:00
Pascal
c125cc9c10 update typings 2018-01-17 17:20:45 +01:00
Amish Shah
b94d60d2ab Merge branch 'master' into voice-rewrite 2018-01-16 17:24:07 +00:00
Isabella
932980e91f fix(guild#createRole): incorrect guild reference 2018-01-16 08:28:08 -06:00
Alex
e576387fea Fix ReactionCollector#remove and make Collector interface more consistent (#2221)
* Fix ReactionCollector#remove and make Collector interface more consistent

* Move those below the doc

* Remove object spread

* Only emit event arguments

* Forgot to delete this line

* Update docs

* Also fix this

* More edits to docs

* Snowflake|string
2018-01-16 01:33:58 +01:00
Isabella
36555c1cea refactor(GuildMember#manageable): refactored kickable and bannable (#2211)
* refactor(GuildMember#manageable): merged kickable and bannable code

* hydar suggestion
2018-01-16 01:32:40 +01:00
bdistin
4122db0275 Return undefined from Collection.find() / findKey() (#2260)
To be compliant with Array.find() / findIndex()
2018-01-16 01:24:19 +01:00
bdistin
3d32dea5e1 remove pointless function from GuildEmojisUpdate (#2256) 2018-01-16 01:20:51 +01:00
bdistin
3038d4b2c7 Address missing application docs in setPresence (#2257)
fixes #2103 according to how crawl says it should be fixed in #2104
2018-01-16 01:20:36 +01:00
bdistin
4fb7e64a39 Add parent, nsfw, bitrate, and userLimit options to GuildChannel.clone() (#2259)
* Add parent, nsfw, bitrate, and userLimit options to GuildChannel.clone()

* fix lint
2018-01-16 01:20:09 +01:00
iCrawl
f61b57ce10 Merge branch 'master' into voice-rewrite 2018-01-15 04:45:48 +01:00
Schuyler Cebulskie
2c8eb8a1ec Fix grammar 2018-01-14 19:03:21 -05:00
pedall
42c0e50c92 Fix ShardClientUtil#broadcastEval - now really accepting functions (#2248)
* small fix to broadcastEval accepting functions

* dont ignore idea anymore (separate PR then)
2018-01-14 20:46:08 +01:00
Dim
351f5f7209 fix: missing height & width in embeds (#2249) 2018-01-14 13:28:46 +00:00
Dim
a3be0f3726 docs: Collection > RoleStore (#2251) 2018-01-14 13:28:00 +00:00
Amish Shah
83640a2640 refactor: tidier overflow checking in StreamDispatcher 2018-01-13 20:50:24 +00:00
Amish Shah
aaa318e465 Merge branch 'master' into voice-rewrite 2018-01-13 20:44:36 +00:00
Yukine
352bd13e6f fix typo in Error constants (#2243)
* fix typo in Error constants

* another one (#1)
2018-01-13 12:52:25 +00:00
Jisagi
ea028ae074 Fix destructuring errors in GuildChannelStore and RoleStore (#2244)
* Permissions#resolve fix

* Travis failed because >120 chars per line

* better fix

Permissions#resolve reverted
removed destructuring in GuildChannelStore and RoleStore
2018-01-13 12:51:09 +00:00
Amish Shah
d541cac9b3 Merge branch 'master' into voice-rewrite 2018-01-13 12:47:56 +00:00
Amish Shah
8cab673fea fix: stream dispatcher throwing key error due to missing secretKey 2018-01-13 12:47:19 +00:00
Gus Caplan
8aafcd6cde allow passing a function to shard eval (#2193) 2018-01-12 14:05:27 +01:00
bdistin
2249da464f Fix member.ban() and channel.clone() (#2241)
* Fix member.ban()

* also fix channel.clone()

* type is an option parameter in the new create

* lint

* better fix for clone
2018-01-11 18:44:35 +00:00
Isabella
9eac19d9d8 refactor: more oop with stores (#2216)
* refactor: more oop with stores

* forgot bulk delete

* Revert "forgot bulk delete"

This reverts commit 1b4fb999ee07b358ee6e1af9efb8981b84f83af1.

* appease linter

* missed some


shh

* fail
2018-01-11 16:33:30 +00:00
Amish Shah
d96f5f246d Merge branch 'master' into voice-rewrite 2018-01-11 16:16:43 +00:00
Amish Shah
90fc161159 Update copyright notice on license 2018-01-11 16:14:54 +00:00
Schuyler Cebulskie
da32dae8f5 Merge branch 'master' into voice-rewrite 2018-01-10 00:14:29 -05:00
bdistin
5efddac025 Fix Channel.delete() example (#2238) 2018-01-09 21:17:08 +01:00
Schuyler Cebulskie
e792757e32 Only create ShardClientUtil when spawned by ShardingManager 2018-01-08 22:13:46 -05:00
Amish Shah
096124b179 Merge branch 'master' into voice-rewrite 2018-01-05 21:24:23 +00:00
Amish Shah
eb40a663dd god damn it i forgot to save the file the first time 2018-01-05 21:23:21 +00:00
Amish Shah
eeded90782 Fix: "value" argument is out of bounds when writing timestamp header to packet 2018-01-05 21:22:11 +00:00
SpaceEEC
2318812f7f fix: allow the Util#parseEmoji regex to match emoji identifier (#2229) 2018-01-04 20:29:32 +01:00
Alex
780a311c0a Minor refactor to Util methods (#2213)
* Minor refactor to Util methods

* Fix derp
2018-01-04 01:18:56 +01:00
1Computer1
01f1f1b58e Fix query string on requests after ratelimited (#2215)
* Fix querystring being appended multiple times when ratelimited

* Better way?

* Better better way

* Fix empty queries
2018-01-04 01:17:15 +01:00
Isabella
45127bb408 docs: improve examples (master branch) (#2209)
* docs: improve examples

* more improvements


fix


maybe this


another example


collectors

* stuff
2018-01-04 01:12:05 +01:00
Isabella
61da73fee0 GuildMember#permissionsFor takes object (#2210) 2018-01-04 01:04:19 +01:00
Gus Caplan
abb93c9eb9 fix location of toString for channels (#2202) 2018-01-04 01:01:39 +01:00
Darqam
954a1c8d1a updating channelCreate example to reflect recent changes (#2194)
* updating channelCreate example to reflect recent changes

Type is now part of the options object, so the example should reflect that.

* changing type to reason per comment
2018-01-04 01:00:39 +01:00
Amish Shah
ac7e066126 Merge branch 'master' into voice-rewrite 2018-01-03 11:28:59 +00:00
Steven
229eb2be2d Fix Collector bug where checkEnd is only called on a valid message (#2186) 2017-12-31 20:21:29 +01:00
Gus Caplan
84e4dd6a99 animated emojis (#2182) 2017-12-31 20:20:52 +01:00
Alex
59d5c5a947 Don't send files in edit request (#2199) 2017-12-31 20:19:05 +01:00
Isabella
4063a3a16b fix(Guild#createChannel): default type to 'text' (#2184)
* fix(Guild#createChannel): default type to 'text'

* gus suggestion
2017-12-23 12:29:42 +01:00
Isabella
4f8f2087c1 docs/fix(setParent): docs update and nullable channel param (#2160)
* fix(setParent): no longer in GuildChannel

* refactored

* little bit less ugly

* space/appel suggestion

* docs fix

* shhhhhhhh

* fun docs trip

* prototype thing

* mark nullable
2017-12-21 09:31:17 +01:00
Yukine
0c16859746 enchanced docs for GuildChannel (#2155)
* enchanced docs for GuildChannel

* changes due request
2017-12-21 09:30:32 +01:00
Isabella
1598efa0b8 fix(CreateMessage): reassigning wrong content (#2169) 2017-12-12 06:33:10 +01:00
bdistin
fe9ea02f8b Make all VoiceChannel bitrates in bps (#2165)
* Make all VoiceChannel bitrates in bps

instead of mixed kbps/bps

* fix edit method in GuildChannel too
2017-12-12 05:02:53 +01:00
Isabella
443961ce43 fix(CreateMessage): fix attachment and array sending (#2158) 2017-12-10 21:22:59 +01:00
Schuyler Cebulskie
96971c432d Merge master into voice-rewrite 2017-12-02 19:48:43 -05:00
Schuyler Cebulskie
20689a51a1 Add exports for new util functions 2017-12-02 17:02:17 -05:00
Gus Caplan
4f4f0764e6 Merge branch 'master' into refactor/webpacks 2017-12-02 15:11:44 -06:00
bdistin
3e3674b1af Fix channels.resolve (#2137) 2017-11-30 14:39:58 -05:00
Yukine
134ef7a61b added a new Typedef for Bans you can get from <Guild>.fetchBans() and fixed a little typo in the fetchAuditLogs() method (#2108)
* added a new Typedef for Bans you can get from <Guild>.fetchBans() due recent change aswell as fixed a little typo in the fetchAuditLogs() mehtod so .type has no the correct type defined

* little change due request

* fixed indentation

* Update Guild.js

* Update Guild.js
2017-11-29 23:36:03 -05:00
Schuyler Cebulskie
77fc046550 Merge branch 'custom-structures' 2017-11-29 23:27:43 -05:00
Frangu Vlad
efd1c4c516 docs: Remove leftover docstring from 11.2 (#2115)
* Fix leftover docstring from 11.2

* Here too

* Update Guild.js

* Update GuildMember.js
2017-11-26 10:59:21 +01:00
1Computer1
2f84d95077 Add more options to MessageMentions#has (#2131)
* Add more options to MessageMentions#has

* Rename ignoreSelf to ignoreDirect
2017-11-26 10:58:17 +01:00
Schuyler Cebulskie
be02875f05 I don't even 2017-11-24 23:16:21 -05:00
Schuyler Cebulskie
7cd0a9525d Fix ClientUser not extending custom User 2017-11-24 23:05:00 -05:00
bdistin
dcf48e2225 Fix inconsistency with Channel Creation: CustomStructures (#2121)
* Fix inconsistancy with Channel Creation

* Because static get is a function, it thinks we are create a new instance based on that function, rather than the returned class...
2017-11-24 22:42:02 -05:00
Schuyler Cebulskie
950e65c7f1 Merge branch 'shard-overhaul' 2017-11-24 22:36:34 -05:00
Schuyler Cebulskie
0d188c0fba Rename ShardingManager#launch event to shardCreate 2017-11-24 22:33:29 -05:00
Schuyler Cebulskie
c6244ee6e1 Fix shards not respawning on exit 2017-11-20 22:37:35 -05:00
Schuyler Cebulskie
527c729aca Possibly fix weird behaviour 2017-11-20 22:29:46 -05:00
Schuyler Cebulskie
c447abad60 Clear evals and fetches on process death 2017-11-20 22:26:14 -05:00
Schuyler Cebulskie
b5459a96fa Move ShardingManager#message event to Shard#message 2017-11-20 22:20:32 -05:00
Gus Caplan
aaa92c0b05 fix things (#2116) 2017-11-20 12:57:45 +01:00
Schuyler Cebulskie
f3817e328b JK, back to Structures.extend 2017-11-20 01:37:19 -05:00
Schuyler Cebulskie
cf07b7e342 Re-add docs 2017-11-20 01:13:36 -05:00
Schuyler Cebulskie
1e0ee2f8fa Replace Structures.extend with set 2017-11-20 01:11:19 -05:00
Schuyler Cebulskie
a2a4c3c196 Fix Presence structure 2017-11-20 00:26:57 -05:00
Schuyler Cebulskie
3728c71867 Fix missing space 2017-11-20 00:24:43 -05:00
Schuyler Cebulskie
63b0c8d5cc Fix circular dependency 2017-11-20 00:23:41 -05:00
Schuyler Cebulskie
f004e6ccca Reimplement Structures.get 2017-11-19 23:00:56 -05:00
Schuyler Cebulskie
6d53d893a8 Make Structures.extend static and tweak error messages 2017-11-19 22:46:38 -05:00
Schuyler Cebulskie
47dc8fd046 Overhaul the way structures are extended 2017-11-19 22:41:45 -05:00
Schuyler Cebulskie
dc379519d3 Fix reaction structure name 2017-11-19 22:30:37 -05:00
Schuyler Cebulskie
0291fe41d8 Fix structure paths 2017-11-19 22:09:43 -05:00
Schuyler Cebulskie
f13c6d0768 Add ID to logo in welcome 2017-11-19 21:28:05 -05:00
Schuyler Cebulskie
c29804e3f8 i aint do nuffin 2017-11-19 21:19:46 -05:00
Schuyler Cebulskie
cfa512c447 Make structures for data stores extensible 2017-11-19 21:16:14 -05:00
Schuyler Cebulskie
26b28813a8 Use a custom promisified setTimeout 2017-11-19 13:47:04 -05:00
Schuyler Cebulskie
acf82f32c3 Mark Shard#_exitListener as private 2017-11-19 02:31:06 -05:00
Schuyler Cebulskie
1338e9bd8e Update sharding docs some more 2017-11-19 02:30:20 -05:00
Schuyler Cebulskie
975da5f1a5 Rewrite sharding class descriptions and link Client 2017-11-19 02:21:29 -05:00
Schuyler Cebulskie
9cd097492c Update doc for ShardingManager#createShard id parameter 2017-11-19 02:06:38 -05:00
Schuyler Cebulskie
f777c19fbf Fix naming conflict with ShardingManager#respawn 2017-11-19 02:03:44 -05:00
Schuyler Cebulskie
637ea09532 Fix lint error 2017-11-19 01:56:51 -05:00
Schuyler Cebulskie
2a332d8d15 Add ShardClientUtil#respawnAll 2017-11-19 01:54:10 -05:00
Schuyler Cebulskie
a414e4884f Overhaul sharding 2017-11-19 01:28:46 -05:00
Schuyler Cebulskie
ad69e2ba4c Merge branch 'master' of https://github.com/hydrabolt/discord.js 2017-11-18 23:34:50 -05:00
Schuyler Cebulskie
f4ac06024e Improve ColorResolvable docs 2017-11-18 23:34:34 -05:00
Crawl
5703e01132 update typings 2017-11-19 05:25:26 +01:00
Schuyler Cebulskie
a2074e8f25 Bump deps 2017-11-18 21:08:06 -05:00
Schuyler Cebulskie
b859501b6f Document and clean up some garbage 2017-11-18 20:30:13 -05:00
Schuyler Cebulskie
c622143e39 Remove Node version check from deploy script 2017-11-18 17:54:50 -05:00
Schuyler Cebulskie
abd6156a90 Maybe fix Travis some more 2017-11-18 17:50:30 -05:00
Schuyler Cebulskie
127d87dca8 Hopefully remove unnecessary work from Travis tests 2017-11-18 17:45:06 -05:00
Schuyler Cebulskie
297ac4e4db Still mucking about with Travis 2017-11-18 17:33:54 -05:00
Schuyler Cebulskie
4a15ccab0f Maybe fix dumb Travis behaviour 2017-11-18 17:26:03 -05:00
Schuyler Cebulskie
547b9cc2f3 Only run Node 8 build for test stage 2017-11-18 17:23:18 -05:00
Schuyler Cebulskie
b7c4df5dc1 Fix trailing space 2017-11-18 17:19:34 -05:00
Schuyler Cebulskie
99a245ce4d Merge branch 'master' of https://github.com/hydrabolt/discord.js 2017-11-18 17:12:31 -05:00
Schuyler Cebulskie
0f4ca39fa3 Add Node 9 to Travis 2017-11-18 17:12:27 -05:00
Drahcirius
8237bc054c So long, long (#1994)
* refactor: remove long dep

* fix linter issue

* remove file extensions

* optimize methods
2017-11-17 14:37:07 +01:00
Frangu Vlad
0cd4a92fb8 docs: Fixed some missing docstrings or incorrect return types (#2093)
* Fix some missing doc strings
Mainly just readonly tags

* Return an error when guild#allowDMs is ran from a bot account, and fix some return types

* WebhookClient implements Webhook, doesn't extend it

* Fix Client#rateLimit docs not showing what it returns

Cause I wanted to handle this event only to see no return props 🤔

* Actually make Client#rateLimit show the right info

Its an object with all the info
2017-11-17 14:20:57 +01:00
SpaceEEC
6fa4fc532c fix(Shard): extend EventEmitter to be able to emit events (#2112) 2017-11-17 02:49:57 -05:00
Schuyler Cebulskie
196cf7652e Add Shard#ready property and related events 2017-11-16 22:49:38 -05:00
Will Nelson
09315ae9db emit ReactionCollector#remove on all unreactions (#2096)
* emit ReactionCollector#remove on all unreactions

this will emit an event when a user removes a collected reaction. this
is in addition to Collector#dispose, which will only fire when all users
have unreacted to the same emoji.

* emit only collected removals
2017-11-16 15:24:53 +01:00
Isabella
2d8e26c24c docs: add Guild#features type (#2105)
* docs: add Guild#features type

* fixed spacing

* make it a list, and add MORE_EMOJI
2017-11-16 15:24:27 +01:00
Isabella
5cd42695ae refactor(MessageReaction): ReactionUserStore (#2078)
* refactor(MessageReactions): fetchUsers() is now users.fetch()

made a lovely class for it and all
happify linter


stuff


i know how to code i swear


i lied

* bdistin suggestions

* space suggestions, rename store

* fix count

* documentation update
2017-11-14 08:11:44 +00:00
Yukine
62544905a0 enhanced setUserLimit to reset when passing null to stay consistent with other methods (#2083)
* added a new check to setUserLimit so it won't silently fail anymore if you put a wrong type in

* adapt spaces idea of converting null to 0

* this way it looks cleaner

* and i need to remove this

* need to do it that way because like Gus said null will not change anyhting

* space prooved me wrong and idk why ist working now
2017-11-10 01:30:13 +01:00
SpaceEEC
05a41b5ca4 fix(Split/Webhook): readd message chunk sending and fix webhook avatar/username (#2085) 2017-11-06 02:42:24 +01:00
SpaceEEC
21d09f338e fix(Guild): correctly resolve user in Guild#addMember (#2090) 2017-11-05 18:52:33 +01:00
Amish Shah
2531065bbd Fix loop and only emit error, not warn 2017-11-04 15:02:58 +00:00
Amish Shah
6a523ba96a Reimplement StreamDispatcher error and start event in docs, emit error instead of debug if there are listeners for errors 2017-11-03 20:01:51 +00:00
Amish Shah
8efafb6a43 StreamDispatcher documented as extending WritableStream, not stream.Writable 2017-10-31 19:50:02 +00:00
Amish Shah
995cd181c9 Fix setFEC bug and use bitrateEditable in setBitrate 2017-10-31 19:47:58 +00:00
Amish Shah
121a40bb4a Use passes and increase highWaterMark to 12 2017-10-31 19:43:58 +00:00
Amish Shah
fa7f391b3a Fix ECONNRESET (again) 2017-10-31 18:12:49 +00:00
Gus Caplan
f63861a334 fix prepublish script 2017-10-29 18:40:56 -05:00
Amish Shah
2e1a28a6ee Use destroy and end in apt places 2017-10-29 18:04:36 +00:00
Amish Shah
cf30b1ef08 Add @extends to some classes 2017-10-29 17:43:22 +00:00
Gus Caplan
29a81eab73 standardize message object creation (#1986)
* standardize message object creation so i don't flip out again

* fix stuff

* Update Message.js

* Update index.js

* Update SendMessage.js

* Update Message.js
2017-10-29 14:54:00 +01:00
SpaceEEC
94a4a068b9 fix(TextBasedChannel): return a promise in startTyping and clarify count parameter (#2047)
* fix(TextBasedChannel): return a promise in startTyping

This fixes #2040

Calling TextBasedChannel#startTyping now returns a promise.
This promise resolves when the bot stops typing (TextBasedChannel#stopTyping) or rejects when an error occurs.
Calling the method again returns the same promise as long the bot is still typing.

* move code into the promise' executor

* Clarify the purpose of the returned Promise

* inverse if and clarify count parameter
2017-10-29 14:53:34 +01:00
Amish Shah
1697b13f15 Update to master 2017-10-29 13:50:49 +00:00
Amish Shah
5cb757add6 Add highWaterMark 2017-10-29 13:48:07 +00:00
Amish Shah
5879cd7c8e Merge branch 'voice-rewrite' of https://github.com/hydrabolt/discord.js into voice-rewrite 2017-10-29 13:19:41 +00:00
Amish Shah
d4a9e5ec9c Fix ESLint and handle stream errors 2017-10-29 13:19:38 +00:00
Sanctuary
1a8e8c7a67 docs: Add/normalize .toString() docs on all classes (#2042)
* docs: Add/normalize .toString() examples on all classes

* docs: Remove exclamation point on ClientApplication#toString example

* docs: Normalize .toString() descriptions on all classes

* Use "returns" instead of "concatenates"
2017-10-28 19:06:26 +02:00
SpaceEEC
0101392334 Documentation improvements (#2069)
* docs: fix documentation in various places

All stores: resolveID returns a nullable Snowflake
GuildAuditLogs: ActionType also can be ALL
MessageEmbed: make files property show up in the docs
ClientApplication: resetSecret and resetToken return a promise
ClientManager: status is readonly
Guild: features is an array of strings and ban no longer accepts a number or string
Guild: ban method no longer accepts a string or number
GuildMember: ^
RichPresenceAssets: small and large Image are Snowflakes, also fixed parameter documentation for small and large image url method
WebhookMessageOptions: file property is no longer a thing

* docs: improve GuildAuditLogs documentation

Prefix types with AuditLog to avoid confusion
Document GuildAuditLogs' static Targets and Actions properties and add necessary typedefs
Use typdefs over primitives where possible.

* fix documentation for Guild#defaultRole
2017-10-28 19:04:03 +02:00
SpaceEEC
a62d1e954d fix(Presence): pass client and default to offline (#2071) 2017-10-28 19:03:27 +02:00
Gus Caplan
50ad66f513 clean up readme a bit (#2054)
* clean up readme a bit

* Update README.md
2017-10-28 19:02:12 +02:00
William Tran
88719f0f42 Typos in docs (#2055)
* Typo in Guild.createRole docs

Added missing semicolon in example code.

* consistent periods in docs
2017-10-28 19:01:17 +02:00
Gus Caplan
c495ea025a fix raw event (#2074) 2017-10-28 18:58:46 +02:00
bdistin
b255af0825 Fix user.bot (#2073)
* fix user.bot

* user.avatar is nullable (docs)
2017-10-28 18:58:27 +02:00
bdistin
cda408534a user.patch shouldn't try to touch the token (#2072) 2017-10-28 18:57:50 +02:00
SpaceEEC
cd3d3344e8 fix(GuildMember#hasPermission): pass correct parameters to Permissions#has (#2070)
Also removed deprecated parameter of the method itself.
2017-10-28 18:57:16 +02:00
SpaceEEC
0a05761b49 Add new exports and remove a deprecated one (#2068)
* add new exports and remove a deprecated one

* fix incorrect require path
2017-10-28 18:55:59 +02:00
Johnson Chen
291af7e845 Change recent to timestamp because DiscordAPIError (#2065)
are lovely arn't they?
2017-10-28 11:35:38 +02:00
Will Nelson
dbf4ef9a7c handle string ffmpeg input (#2064)
* handle string ffmpeg input

* rename stuff for new purpose

* file prefix isn't needed

* pass tests

* remove dumb spaces in dispatcher docs
2017-10-27 22:42:21 +01:00
Schuyler Cebulskie
0fc9459450 Add TextChannel#setNSFW method (#2050)
* Add TextChannel#setNSFW method

* Doesn't look like anything to me

* butts
2017-10-27 10:34:18 -04:00
Gus Caplan
cd54e9317f Time Difference in REST (#2057) 2017-10-27 14:36:53 +01:00
Amish Shah
8a87cbf404 Better broadcast stuff 2017-10-27 14:32:02 +01:00
Amish Shah
a8511ebfaf Fix player 2017-10-26 21:50:52 +01:00
Amish Shah
393130dedb things 2017-10-26 21:26:00 +01:00
Amish Shah
bdf8955098 "yeah we need voice broadcasts cause we make big big music bots" no stop 2017-10-26 21:00:53 +01:00
Gus Caplan
bc30fdd867 Fix Avatar URL generation bug (#2063) 2017-10-26 20:07:27 +01:00
Amish Shah
3696b4a810 Add ability to disable volume transform 2017-10-26 18:56:02 +01:00
Amish Shah
6490d1b911 FEC and PLP exposed 2017-10-26 18:36:04 +01:00
Amish Shah
cc4aa75a71 Fix closing bug 2017-10-26 18:22:43 +01:00
Amish Shah
387d96bd6b Add setPLP and setFEC 2017-10-26 18:22:18 +01:00
Amish Shah
45ef80b92f Fix docs 2017-10-26 18:05:45 +01:00
Amish Shah
eeed5f23e3 Move streams to StreamDispatcher
breaking: removed AudioPlayer#setBitrate
2017-10-26 17:53:10 +01:00
Amish Shah
a79c9ac11a add: StreamDispatcher#pausedTime 2017-10-26 17:11:03 +01:00
Amish Shah
116b4c3788 Rename unpause to resume 2017-10-26 16:47:59 +01:00
Amish Shah
c8a75e4c29 More volume docs 2017-10-26 16:44:21 +01:00
Amish Shah
b83e12634c Docs 2017-10-26 16:35:20 +01:00
Amish Shah
780e67d19f Volume!! 2017-10-26 16:30:55 +01:00
Amish Shah
863e38676f Add back setBitrate 2017-10-26 14:39:58 +01:00
Gus Caplan
23a0b97fbb fix script name 2017-10-26 08:29:26 -05:00
Amish Shah
f6959a848f Start some docs crap 2017-10-26 14:17:56 +01:00
Amish Shah
ac0cc9a009 Remove useless SecretKey class 2017-10-26 14:02:44 +01:00
Amish Shah
3e3e6f9af7 Actually fix ESlint this time 2017-10-26 13:45:36 +01:00
Amish Shah
8913096f73 Fix Travis by removing stuff for fun 👌👌 2017-10-26 13:42:21 +01:00
Amish Shah
53ca34cbde Don't need to continue count and pausedTime amongst dispatchers 2017-10-26 13:33:14 +01:00
Amish Shah
f5d10a5f76 Pause/Unpause 2017-10-26 13:32:38 +01:00
Amish Shah
79c10f7084 Fix resetting timestamps 2017-10-26 12:01:04 +01:00
Amish Shah
ca93c05eee Merge branch 'master' into voice-rewrite 2017-10-26 11:59:28 +01:00
SpaceEEC
cd08a3b5a4 refactor(Actions): remove obsolete user and guild member get actions (#2061)
The UserGetAction was never used.
The GuildMemberGetAction was only once used.
Easily replaced with a shorter and more comprehensible line. (Also consistent with the rest of the library)
2017-10-26 08:52:03 +01:00
Amish Shah
a76e4c064d Fix sequence and timestamp growing too large 2017-10-26 00:32:14 +01:00
Amish Shah
7f90d4ebc5 Better ending 2017-10-25 23:46:05 +01:00
Amish Shah
48452173ca probably would cause an error somewhere 2017-10-25 23:21:02 +01:00
Amish Shah
65673197d4 Start rewrite with new prism 2017-10-25 23:14:41 +01:00
Gus Caplan
f8f804da36 wew 2017-10-25 16:09:36 -05:00
Gus Caplan
0589b7d7f1 zlib stream compression (#2028) 2017-10-25 17:30:03 +01:00
Isabella
0277d1de78 fix(Client): login wasnt using env.token (#2060) 2017-10-25 17:29:36 +01:00
Gus Caplan
ee1d4c53f2 Add rateLimit event (#2019)
* add ratelimited event

* add some useful props

* death

* more death

* Update tester1000.js

* Update RequestHandler.js
2017-10-24 21:07:21 +01:00
Amish Shah
80595d9bec Stop ESLint whining 2017-10-22 22:04:29 +01:00
Amish Shah
3e460162ca Update prism-media dependency to 0.0.2 2017-10-22 22:00:14 +01:00
Amish Shah
07bacf2a7d Update opusscript dependency to 0.0.4 2017-10-22 22:00:04 +01:00
Amish Shah
96ce1b0945 Update libsodium-wrappers peer dep and fix support for the newest version 2017-10-22 21:59:30 +01:00
Amish Shah
0004e19eca Fix ESLint issue 2017-10-22 16:03:35 +01:00
Amish Shah
29d743a521 Fix #2018 (rapid joining/leaving of voice channel causes a crash) 2017-10-22 14:29:49 +01:00
SpaceEEC
356778b9d5 fix(MessageBulkDeleteAction): remove deleted messages from cache (#2046)
Fixes #2036
2017-10-22 14:51:44 +02:00
Gus Caplan
339bcfd325 clean up webpack/deploy stuff (#2044)
* fix stuff i think

* Update deploy.sh

* Update deploy.sh
2017-10-22 14:45:32 +02:00
Gus Caplan
296046dbc6 remove ua manager (#2015) 2017-10-19 07:11:07 +02:00
Frangu Vlad
37f5256a04 fix(GuildChannel|Role.edit) Editing with a position not being right (#2010)
* Fix GuildChannel.edit and Role.edit for positions

* Re-use Util.setPosition
And also make it even more compact! And it works! \o/
2017-10-19 07:10:39 +02:00
Évelyne Lachance
8d7e745ee8 Patch timestamp of 0 on guild join date (#2041)
The Discord API seems to send a timestamp of 0 for the joined_at on presence updates. This patch resolves this by ignoring timestamps of 0.
2017-10-19 07:07:18 +02:00
kitsuyui
6b249ba454 Fixes #2034 (#2035)
Cancelling: https://github.com/hydrabolt/discord.js/pull/1745/files#diff-31d1bb7c08f2176ba026497c2e8d9b3fR81
2017-10-19 07:06:12 +02:00
SpaceEEC
fa3eee8fd9 fix(GuildDelete): disconnect voice and cleanup GuildChannels (#2026) 2017-10-19 07:03:02 +02:00
Gus Caplan
69d84081d3 Update Guild.js (#2027) 2017-10-19 07:02:32 +02:00
SpaceEEC
d8850dbdd8 feature(Webhook): allow to edit the channel of webhooks (#2039) 2017-10-19 07:01:20 +02:00
SpaceEEC
68a30584db refactor: remove redundant Client#rest and obsolete RESTManager#destroy (#2022) 2017-10-11 02:29:50 +02:00
Gus Caplan
d8f6198a12 fix websocket ratelimits (#2014) 2017-10-09 02:40:54 +02:00
Gus Caplan
69dcfa0708 fix Client#login from other invalid things (#2013) 2017-10-09 02:39:52 +02:00
Robin B
97823bc376 Various documentation adjustments (#2001)
* docs(various): Add "at" to createdAt description

* docs(Client): Adjust to fit with guilds property

* docs(various): Adjust phrasing & fix typos

* docs(various): Clarifications

* docs(Permissions): fix numerus

* docs(DataStore): capitalize DataStore

* docs(various): Formatting changes

* docs(Presence): Expand RichPresenceAssets docs

* Add space
2017-10-07 01:56:17 +02:00
Isabella
8fbae13040 fix(GuildAuditLogs): incorrect webhook reference (#2004)
* fix(GuildAuditLogs): incorrect webhook reference

* i cant trust my linter anymore

* use changes object
2017-10-07 01:55:53 +02:00
Frangu Vlad
f178f9ba6c fix(setPosition): rawPosition never getting updated when setPosition was called (#2006)
* Fix setPosition issue

The rawPositions were never updated from using setPosition, now they are.

* Fix bubbling issue

Also, yes. It took me 8 hours to get back home. Deal with it :D

* Watch your copy paste
2017-10-07 01:55:30 +02:00
Frangu Vlad
3871662a95 fix(setSpeaking) Fix #2005 (#2007) 2017-10-07 01:55:16 +02:00
Isabella
b462a7b94f fix(Role): setPosition typo (#2003) 2017-10-03 21:12:38 +02:00
Gus Caplan
abe98f716b run builds for prs without commiting (#1997) 2017-10-03 12:02:15 +02:00
Jack Baron
b8c70e7935 Typo in Message.awaitReactions docs (#1999) 2017-10-03 12:01:48 +02:00
Frangu Vlad
743668a10d fix: setPosition taking wrong IDs and edit with position 0 breaking (#1989)
* Fix typo in setPosition

* Same typo in Role

* Fix edit with position breaking when the position was 0

* Eslint

* Revert code but fix the position issue
2017-10-02 15:54:18 +02:00
Frangu Vlad
fc43736447 docs: Change repo for erlpack (#1992)
* Update npm command for erlpack

* Here too
2017-10-02 15:54:00 +02:00
kyraNET
b8f17aa51c [Documentation] Added a warn in fetchMentions (#1991) 2017-10-01 18:16:56 +02:00
SpaceEEC
3c0d7b8105 enhancement/feature(bulkDelete): accept array of ids and handle case of 0 or 1 message(s) (#1980) 2017-10-01 11:58:13 +02:00
Yukine
d41675c080 Export DataStore from the Discord.js module (#1981) 2017-10-01 11:57:00 +02:00
SpaceEEC
cc8060c1bd fix/feature(createChannel): add support for more properties and fix overwrites optionals (#1983) 2017-09-28 07:55:28 +02:00
SpaceEEC
1537dd7be7 fix(MessageEmbed): don't send 'files' as part of the embed (#1982) 2017-09-26 19:17:27 +02:00
Gus Caplan
27ccad1f1c tinify webpacks (#1975)
* tinify webpack

* meme

* fix long version

* more changes

* even smoler

* fix up logic

* fix build

* undo changes to user agent manager because its not webpack'd anymore

* the heck

* fix stupid

* clean up browser rules

* typo
2017-09-26 07:18:12 +02:00
Gus Caplan
4d4d2f2db7 add agent support (#1973) 2017-09-25 20:46:19 +02:00
Dim
97dc85f491 Typo (#1969) 2017-09-25 20:41:50 +02:00
Gus Caplan
6ce9a8743f update browser stuff and browser eslint (#1938)
* Update browser.js

* Update .eslintrc.json

* Update package.json

* Update package.json

* stop doing manually what webpack can do for us

* Update .eslintrc.json

* Update package.json
2017-09-24 21:01:47 +01:00
Dragon Fire
82841c6ce1 Fix for a small hasPermission error (#1971) 2017-09-24 18:41:06 +02:00
bdistin
f89ec00b30 Missed a deprecated method removal (#1950)
And another that should be removed too.
2017-09-24 17:29:45 +02:00
bdistin
c2029a66e9 Rip, fixes a bug we didn't even know to look for... 1870 lives on. (#1931)
possibly fixes #1870
2017-09-24 17:24:58 +02:00
Frangu Vlad
26c978c465 docs: Small doc improvement for PermissionOverwrites (#1964)
Just so people know what the possible types are.
2017-09-24 17:23:41 +02:00
Gus Caplan
dca0bac444 fix typo in ws manager (#1966) 2017-09-23 19:13:30 +02:00
Frangu Vlad
eb591dafba docs: Fix some small typos or "missing" docs (#1943)
* Fix documentation for GuildAuditLogEntry.target

* Update documentation for CategoryChannel#children

* Add EntryTarget for audit logs

I've done this to "fulfill" devsneks request while also showing all the possible results for the target of an AuditLogEntry

* Oops Eslint

* Private timeout sets gets set by BaseClient not WebhookClient

* Fix the "Missing Docs" for Presence#activity

* Small doc inconsistency

Array<Number> instead of Array<number> for Activity

* Client#emojis is an EmojiStore not a Collection

* Document ClientPresenceStore

Just so its clickable through the wiki, nothing else is documented

* Small fix for BaseClient#setInterval

You don't wait before executing, you execute every X ms

* GuildChannelResolvable takes a GuildChannel/Snowflake

* Typo in UserResolvable

* Another typo for UserResolvable

* Add the number to the Status and VoiceStatus docs

Its probably not needed, but just so the user knows what each number means, its now documented.
2017-09-21 07:02:47 +02:00
Gus Caplan
f2502e29b9 update dep for org name change (#1953) 2017-09-20 21:03:00 +02:00
SpaceEEC
3ace61a179 fix(ClientManager): reject login with proper error on timeout or on connection failure (#1947) 2017-09-16 20:32:03 +02:00
SpaceEEC
ec4c98704f refactor: make use of destructuring for Constants (#1942) 2017-09-16 20:31:36 +02:00
SpaceEEC
25ece1882b fix(Reactions): make MessageRection#id again null for default emojis (#1940)
Which was causing issues when resolving their identifier and MessageRection#id was also stated as nullable Snowflake, which a unicode not is
2017-09-14 12:36:08 +02:00
Gus Caplan
b62c472d0a Fix .npmrc to not create package-lock.json (#1936) 2017-09-13 02:19:29 +02:00
bdistin
64cbb98fb3 Channel permissionLock support (syncing with category permissions) (#1924)
* add permissionsLocked

* wip permissionLock()

* should be good

* better method name

* see if this fixes channel jumping

* fix property names

* each overwrite is a different instance, and thus the pointers do not equal, even if the values do.

* add more documentation to the edit method
2017-09-11 19:33:30 +02:00
Raphael
18389c7659 fixed small typo's in the Docs and added an example to <Guild>.setSystemChannel() (#1934) 2017-09-11 19:33:04 +02:00
SpaceEEC
cc0b65d70b fix(EmojiStore): return super.create in the create method (#1932) 2017-09-11 01:20:55 +02:00
bdistin
29b4ca7f23 Fixes #1929 (#1930) 2017-09-10 18:13:28 +02:00
bdistin
98b81fac38 fix permissions not resolving correctly (#1928) 2017-09-10 16:27:04 +01:00
Frangu Vlad
3767b35189 Fix check for GuildChannel#deletable (#1925)
You can now delete any channel you want, even if its ID is the same as the guild ID
2017-09-10 14:25:33 +02:00
Robin B
fc1e78e545 fix(DataStore): make resolveID work properly (#1927) 2017-09-10 14:21:08 +02:00
Drahcirius
63f6247ce5 fix/feat(MessageEmbed): deep copy fields and fix files when passed into constructor (#1864) 2017-09-09 23:43:13 +02:00
Gus Caplan
c523e224d7 fix sorting things (#1922)
* fix sorting things

* Update Guild.js
2017-09-09 23:43:02 +02:00
Gus Caplan
f4c2d6dfa2 fix a thing (#1921) 2017-09-09 22:55:26 +02:00
Gus Caplan
2ffe3048ba clean up positions (#1919)
* clean up positions

* perf i guess
2017-09-09 22:40:32 +02:00
bdistin
98582cd1b7 Permissions Cleanup (#1643)
* fix Permissions.add/remove, by completely changing what they do

* permissions cleanup

Removes overwrite._denied and overwrite._allowed in favor of overwrite.denied.bitfield and overwrite.allowed.bitfield

uses the modified Permissions.add and Permissions.remove to clean up existing code

fixes GuildMember.missingPermissions

changes Permissions add/remove to reverse loops for speed, changes resolve to allow the number 0 as a valid permission.

* Revert createChannel overwrite.allow / overwrite.deny for arrays of {allow:bitfield, deny:bitfield}

Documentation should be improved here, although I would need advice. I believe a overwrite object typedef is needed, to show the structure of the object, and also include that collections may be used for this, rather than arrays.

* api router fix for overwritePermissions

* add Permissions.freeze, and change all returned Permissions to immutable instances

* Make Permissions a permission resolveable

change role.permissions to be an instance of Permissions

* Make permissions.add/remove return a new instance if the instance is frozen

* Fix invalid error

* Update GuildChannel.js

* Update Guild.js

* fix bad merge
2017-09-09 22:07:39 +02:00
bdistin
b3e5f6271c More docs stragglers I didn't see (DataStore cleanup) (#1912)
* travis can see more than I can

* Update PresenceStore.js

* should fix missing parent travis message
2017-09-09 20:20:19 +02:00
Frangu Vlad
5b46ae59bd Fix some documentation about the category channels (#1917)
* Document CategoryChannel

* More fixes

* Sorry Crawl

* createChannel can return CategoryChannel

* Did senks requests

* I can't grammar

* Other snek request
2017-09-09 20:18:41 +02:00
Gus Caplan
c46c092d0d add channel categories (#1727)
* add channel categories

* add specific class

* speed

* Update Channel.js

* fix type typo

* Update Channel.js

* rewrite position stuff in prep for category sorting

* fix small issues in generation of permissions

* Update Guild.js

* Update Constants.js

* Update GuildChannel.js

* doc fix

* Update GuildChannel.js

* <.<
2017-09-09 14:11:54 +02:00
bdistin
ac4b2b3193 Fix GuildMember being undefined (#1915)
* GuildMember being undefined

* tested... not even a circular.
2017-09-09 14:10:57 +02:00
Dragon Fire
30757cc97b Fix for emojis not being an EmojiStore (#1916)
* Fix for emojis

* Proper fix
2017-09-09 14:10:27 +02:00
Dragon Fire
4626bca76f Fix resolveID typo in guild.unban (#1913) 2017-09-09 01:45:03 +02:00
bdistin
4748577194 Fix DataStore cleanup docs (#1911)
* fix RoleStore Docs

* fix ChannelStore docs

* fix GuildChannelStore docs

* fix GuildStore docs

* fix MessageStore docs

* fix ReactionStore docs
2017-09-09 00:16:43 +02:00
Gus Caplan
67c239b33f update webhook cache and message cache stuff (#1910) 2017-09-08 23:19:30 +02:00
bdistin
dd085ceaee Datastore cleanup (#1892)
* Start Store cleanup

* wip store cleanup

* fix iterables initiating datastores

* handle the possibility of a datastore with no holds and no its own 'create' method

* more cleanup (instances that need more than just client/data)

* missed RoleStore extras

* not sure how eslint didn't catch that tab...

* avoid re-getting the channel we already have...

* cleanup resolvers and refactor them into DataStores

* ^

* and remove

* fix some bugs

* fix lint

* fix documentation maybe?

* formatting

* fix presences

* really fix presences this time

* bad fix was bad... let;s see how bad this one is..

* forgot to save a file

* make presence resolving take userresolveables too

* fix tabs in jsdocs

* fix bad fix from last night that caused issues, with better fix...

* oops
2017-09-08 23:06:10 +02:00
Isabella
0607720ec8 docs: improve documentation (#1898)
* improve channel documentation

* forgot some stuff

* another one

* im good at this

* i did a dum
2017-09-08 02:01:35 +02:00
Robin B
41c4999c2b fix(Guild): Fix setChannelPositions method (#1900) 2017-09-08 00:50:28 +02:00
SpaceEEC
e34bd7c09c fix(Errors): throw DiscordjsErrors where one would expect them (#1905) 2017-09-08 00:50:01 +02:00
Robin B
d6b276bc29 refactor(Attachment): Merge MessageAttachment with Attachment (#1894)
* refactor(Attachment): Merge MessageAttachment with Attachment

* refactor(Attachment): Rename setup to _patch for consistency

* refactor(MessageAttachment): Global rename of Attachment class
2017-09-06 23:12:20 +02:00
SpaceEEC
694f78cd43 fix(WebhookClient): use applyToClass instead of multiple inheritance (#1896) 2017-09-06 23:11:40 +02:00
iCrawl
2305311ec1 fix: voice websocket sending 2017-09-06 16:38:42 +02:00
Gus Caplan
675e1eccb1 Separate websocket internals for RPC (#1893)
* websocket centralization

* more centralization

* whoops

* Update WebSocket.js
2017-09-06 07:20:10 +01:00
Amish Shah
f95ae4fcb7 Fix userUpdate not triggering for initial setting (or removal) of avatars (#1849) 2017-09-05 19:44:59 +01:00
Amish Shah
99419a3670 Fix #1310 (strip RTP header extensions) 2017-09-05 19:14:54 +01:00
iCrawl
9e66e806ce fix: minified webpack builds 2017-09-05 19:03:06 +02:00
iCrawl
a8df63ad1a docs: collection first, firstKey, last, lastKey
"count is negative" -> "amount is negative"
2017-09-05 18:04:18 +02:00
Amish Shah
4a8ada9c43 Fix ESLint error 2017-09-05 12:02:21 +01:00
Amish Shah
e686c9a816 Fix userUpdate event 2017-09-05 11:52:17 +01:00
Robin B
e5ac8f34ee Collections: Negative amounts and fixes (#1889)
* feat(Collection): Negative amounts plus fixes and refactor

* fix(Collection): Fix result when supplying false boolean as amount
2017-09-05 11:31:33 +01:00
Amish Shah
37d84b14f8 Re-add VoiceChannel#members and messageUpdate to the documentation 2017-09-05 11:16:56 +01:00
SpaceEEC
87fa74acd4 ClientUserGuildSettings: avoid uncaught exception and a bit of refactoring (#1885)
* refactor(ClientUserGuildSettings): make client first parameter of the constructor

* refactor(ClientUserChannelOverride): patch if possible rather then reinstantiating every update

* fix(ClientUserGuildSettings): avoid uncaught exception when patching newly joined guilds/gdms
2017-09-05 02:40:46 +02:00
SpaceEEC
bb4fe256e0 fix(Client): apply shardId and shardCount to the correct options object (#1888) 2017-09-05 02:40:22 +02:00
Schuyler Cebulskie
70612d3a7c Update typings 2017-09-04 18:39:47 -04:00
Gus Caplan
18e3801bb7 lots of important stuff (#1883)
* lots of important stuff

* Update Constants.js
2017-09-04 17:49:44 +02:00
Cynthia Lin
3a503ef56e Fix code inconsistencies and redundancy in util/Collections.js. (#1884)
* Normalize undefined type checks in collections with typeof operators.

* Remove redundant number type checking in collections.

Number.isInteger() throws false for strings and any other types that aren't numbers.
2017-09-04 17:45:58 +02:00
Amish Shah
2e4de62ddf Potentially fix #1870? 2017-09-04 14:14:11 +01:00
Robin B
ea1949a0e2 fix(MessageStore): Fix fetchPinned method and add notice. (#1881) 2017-09-04 05:26:36 +02:00
SpaceEEC
f40a5e9f88 feature(MessageReaction): add after option when fetching users who reacted with an emoji (#1882) 2017-09-04 05:22:01 +02:00
SpaceEEC
c4b5736a16 refactor/fix(DataStores): move instantiating of store related classes into their date stores (#1869)
* refactor/fix(DataStores): move instantiating of store related classes into the relevant create methods and fixed FetchMemberOptions

* Renamed ChannelStore's constructor parameter for claritiy

* define client property before creating items from passed iterable to avoid the client property being undefined

* Fix fetching members with a limit

* add static Channel#create back and moved channel instantiating there

* make ChannelStore's constructor accept an iterable

* make iterable an optional parameter, allow to just pass client and options

* fixed a little typo in docs of <User>.displayAvatarURL() (#1872)

* Rewrite presence a little bit (#1853)

* such presence many good

* Update PresenceStore.js

* Update index.js

* Update ClientPresenceStore.js

* Update Presence.js

* Update ClientPresenceStore.js

* Update ClientUser.js

* Update Presence.js

* add timestamps and party

* Update Presence.js

* Update PresenceStore.js

* Update ClientPresenceStore.js

* Update ClientPresenceStore.js

* fix: made options.type optional in ClientUser#setActivity (#1875)

* fix: made options.type optional in ClientUser#setActivity

* some changes, smol fix

due to too many types being possible, it should just be defaulted to 0. this means streamers will have to set the type manually, though.
also mistake with activity.name check

* docs(Collection): Adjust exists documentation (#1876)

Since the return value of Collection#exists is basically just a boolean of Collection#find's result, the same documentation and arguments can and should be applied.

* refactor(Emoji): remove Guild#deleteEmoji in favour of Emoji#delete (#1877)

* refactor/fix(DataStores): move instantiating of store related classes into the relevant create methods and fixed FetchMemberOptions

* Renamed ChannelStore's constructor parameter for claritiy

* define client property before creating items from passed iterable to avoid the client property being undefined

* Fix fetching members with a limit

* add static Channel#create back and moved channel instantiating there

* make ChannelStore's constructor accept an iterable

* make iterable an optional parameter, allow to just pass client and options

* rebase, this time with saving the file

* address issue with falsy activity throwing errors when setting client's presence
2017-09-03 12:57:49 +02:00
SpaceEEC
c93c4ad21f refactor(Emoji): remove Guild#deleteEmoji in favour of Emoji#delete (#1877) 2017-09-03 12:01:47 +02:00
Robin B
efbde07650 docs(Collection): Adjust exists documentation (#1876)
Since the return value of Collection#exists is basically just a boolean of Collection#find's result, the same documentation and arguments can and should be applied.
2017-09-03 12:00:36 +02:00
Isabella
39013b1242 fix: made options.type optional in ClientUser#setActivity (#1875)
* fix: made options.type optional in ClientUser#setActivity

* some changes, smol fix

due to too many types being possible, it should just be defaulted to 0. this means streamers will have to set the type manually, though.
also mistake with activity.name check
2017-09-03 12:00:11 +02:00
Gus Caplan
c4df2502ec Rewrite presence a little bit (#1853)
* such presence many good

* Update PresenceStore.js

* Update index.js

* Update ClientPresenceStore.js

* Update Presence.js

* Update ClientPresenceStore.js

* Update ClientUser.js

* Update Presence.js

* add timestamps and party

* Update Presence.js

* Update PresenceStore.js

* Update ClientPresenceStore.js

* Update ClientPresenceStore.js
2017-09-02 23:57:02 +01:00
Raphael
765b652e6a fixed a little typo in docs of <User>.displayAvatarURL() (#1872) 2017-09-02 14:56:49 +02:00
SpaceEEC
1bdaa62481 fix(Guild): passing the constructor partial data from an invite no longer errors (#1868) 2017-09-01 16:05:02 +02:00
Isabella
b8a37b6f0c fix removal of Guild#afk/system channels and icon (#1863)
* fix removal of Guild#afk/system channels

* guild#setIcon too

* less ternary, many wow
2017-09-01 07:33:41 +02:00
Frangu Vlad
434a22dc4e MessageOptions can take content (#1861) 2017-08-31 18:27:58 +02:00
Amish Shah
7f921883f4 Fix TextChannel#createWebhook 2017-08-31 15:55:05 +01:00
Frangu Vlad
7b6190da01 Fix documentations that were incorrect or missing (#1837)
* Fix docs for Guild#pruneMembers

* ClientApplication returns

* Guild#deleteEmoji

* Guild#setRolePosition takes RoleResolvable

* Client#fetchApplication returns ClientApplication not Oauth2Application

* ClientDataResolver#resolveImage can return null

* ClientApplication#toString small example

* Guild#allowDMs now has a only for user accounts warning

* ClientUserSettings#patch is private and setGuildPosition has a user account warning

* Role#setPermissions can take PermissionResolvable, not just String

* ChannelCreationOverwrites is for a role or a member, not for a "group"

* Fix ChannelData#userlimit string being wrong
"The user limit of voice the channel" :lul:

* ChannelResolvable is only for Channel or Snowflake

* EmojiIdentifierResolvable supports Snowflakes

* UserResolvable doesn't take a guild

* Make patch functions private

* Remove examples

* Webhoox#edit options.name defaults to the webhook name

* Make VoiceConnection functions private

* Am dum
The whole ClientUserSettings category is only for self bots soo

* Value for update functions is *

* Make update functions be private

* Fix GuildEditData missing Ssytemchannel property

* PermissionOverwriteOptions can accept null as an option
(Why did no-one document this?)
2017-08-31 09:16:27 +02:00
Amish Shah
5121a02f13 Fix #1854 2017-08-30 12:33:01 +01:00
Amish Shah
eb5ba4e45e Fix #1855 2017-08-30 12:20:32 +01:00
SpaceEEC
4e028d713a Fixing MessageReaction#count always being 1 (#1857) 2017-08-30 13:01:27 +02:00
SpaceEEC
b7c55f02c2 Allow Message#edit to accept a MessageEmbed as options parameter (#1844) 2017-08-28 03:05:34 +02:00
SpaceEEC
65d9d46a3c Fixed DataStore, deprecation leftovers and a bit of Event Constants (#1841)
* Fixed leftover fetchThing and removed unused methods/error messages

* Added resume event constant and used event constants wherever possible

* Replaced mentions of removed method name with their new name.

* Fixed typo: resume -> resumed
2017-08-28 00:11:28 +02:00
SpaceEEC
c4fecf6609 Simplified image resolving and used an options object when creating webhooks (#1843) 2017-08-28 00:11:19 +02:00
SpaceEEC
258fc4ecf3 Fix MessageMentions#has not returning true for role mentions (#1840) 2017-08-27 23:51:15 +02:00
iCrawl
3c532f16bc Remove unused Util require 2017-08-26 16:12:18 +02:00
Amish Shah
4f5cbbc0f0 Merge branch 'master' of https://github.com/hydrabolt/discord.js 2017-08-26 13:51:56 +01:00
Amish Shah
7d750c4680 pass on error 2017-08-26 13:51:53 +01:00
Gus Caplan
d792c6764a ChannelStore LRU (#1832) 2017-08-26 13:48:31 +01:00
Amish Shah
92a52460e1 Fix GuildMemberStore docs 2017-08-26 13:47:26 +01:00
Amish Shah
30dd3e0cff Fix #1684 2017-08-26 13:43:13 +01:00
Amish Shah
51fe80fd11 fix fetching all members 2017-08-26 13:08:54 +01:00
Amish Shah
c3d7c73e47 Add GuildMemberStore#fetch 2017-08-26 13:00:36 +01:00
Frangu Vlad
284f4e8ac0 Fix MessageEmbed copy paste (#1834)
The addField function wouldn't have errored if value wasn't a string
2017-08-26 10:03:44 +01:00
BigBrainAFK
86ffdc38d3 Mark video property as readonly (#1833) 2017-08-26 10:00:33 +01:00
Amish Shah
5fcc483ded Donate badge thxxx 2017-08-26 00:26:03 +01:00
Amish Shah
170f687d81 actually fix that delete thing (#1507) 2017-08-26 00:08:12 +01:00
Amish Shah
5a3b59b4b0 Fix #1685 2017-08-25 23:57:29 +01:00
Amish Shah
84153be894 Fix #1281 2017-08-25 23:41:26 +01:00
Amish Shah
5f694d1149 Make resolve types stricter
- UserResolvable no longer allows a guild
- ChannelResolvable no longer allows a message or a guild
- ChannelResolvable no longer allows a message or a guild
2017-08-25 23:10:05 +01:00
Isabella
fbb1253b3f Added resolveImage to reduce code duplication (#1820)
* add client#resolveImage

* oops

* resolveFile fix

* async is the future

* async

* update doc example

* build fix

* doc fix

* fix docs

* thx hydar
2017-08-25 22:17:38 +02:00
Amish Shah
b8315b79c7 Store and Model Refactor (#1618)
* UserStore refactor

* Create ChannelStore, remove redundant methods in ClientDataManager

* Create GuildStore

* Emoji stuff

* Use a Base class where possible to reduce code duplication

* Remove unnecessary comments from ChannelStore

* Add Base._clone();

* Remove unused ClientDataManager methods

* Refactor some more stuff

* ESLint

* Move Client#fetchUser to client.users.fetch

* Remove .has checks and just see if .get is truthy

* Fix guild member chunk error

* ESLint

* Fix typo

* Fix channel storing for user bots

* Remove ClientDataManager

* GuildChannelStore

* Reduce use of Util.cloneObject

* and this one too

* update typings

* Fix MessageUpdate handling (#1507)

* Fix role updates (probably fixes #1525)

* fix for eslint

* Address some of appell's comments

* Use debug constant

* start message store crap if it's ugly tell me later k

* fix that

* message store but works™️

* clean up guild stuff

* clean up channel store stuff

* clean up channel event handling

* does this message stuff work? find out soon in the next episode of dIsCoRd.Js

* eslint

* emojis

* emojis and reactions

* hi my name is eslint and im A LIL SHIT

* so i forgot this huh

* user stuff

* Fix @class

* Fix message stuff

* Fix user store docs

* Document all the bases

* fix the super things

* tidy up remove

* fix textbasedchannel

* fix that too

* fix emoji store

* make voice state stuff less ugly

* make voice states even less ugly

* make members less bad

* fix bug

* fix that too

* fix reactions

* how was this broken for so long

* role store

* remove super._patch from UserConnection

* Rename UserProfile#setup to _patch

* remove unnecessary super calls

* update docgen dep (pls fix travis thx)

* doc messagestore

* fix docs

* message store docs

* things

* DOCS PLS

* more things

* Document TextBasedChannel#messages as a MessageStore

* Rebase

* All the stores!
2017-08-25 21:08:58 +01:00
iCrawl
243ff48a67 Remove unneeded doc string 2017-08-24 00:36:13 +02:00
Gus Caplan
b9ea83afb4 update web.md (#1821) 2017-08-22 21:20:26 +02:00
Gus Caplan
b055dae998 make webpack over 9000 times better (#1816)
* webpack stuff

* even better

* Update browser.js
2017-08-22 19:55:28 +02:00
Isabella
4520c801d3 update attachment & docs (#1815) 2017-08-21 23:11:58 +02:00
Isabella
0c0ec72cb8 Fix Guild#createRole with position (#1720)
* Fix Guild#createRole with position + validation

* remove position validation, small update

* fixed async issue if position provided
2017-08-20 23:36:22 +02:00
Will Nelson
2c763073d7 add capture groups to MessageMentions and validate snowflake ranges (#1612)
* add capture groups

* update patterns to valid snowflake ranges
2017-08-20 23:26:13 +02:00
bdistin
9c2e3b8978 Pass the collection of X collected in collectors (#1594)
...to the filter function.
2017-08-20 23:13:08 +02:00
Gus Caplan
8b8a365e99 fix ratelimits (#1806) 2017-08-20 10:14:38 +02:00
Gus Caplan
8c855855cd Guild/systemchannel (#1799)
* add cool system channel

* Update Guild.js

* Update Guild.js

* Update Guild.js
2017-08-20 05:15:02 +02:00
Gus Caplan
55543754b9 proper fix for #1685 (#1805)
* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update WebSocketConnection.js

* Update RESTManager.js
2017-08-20 05:14:49 +02:00
Gus Caplan
9b97fe292f Remove partial classes (#1794)
* remove partial objects

* remove partial evil

* Update Invite.js

* Update Invite.js
2017-08-17 20:49:41 +02:00
iCrawl
fff8b764af Update package.json 2017-08-17 20:20:20 +02:00
iCrawl
2aa2f73c74 Docs cleanup 2017-08-17 20:04:01 +02:00
Gus Caplan
5ce0def9d0 fix sync (#1792)
* Update Ready.js

* Update ClientDataManager.js
2017-08-17 18:28:01 +02:00
Gus Caplan
23d42d7e22 permissions rename :3 (#1788)
* permissions rename :3

* Update Permissions.js

* Update TextChannel.js

* Update GuildChannel.js
2017-08-17 18:27:50 +02:00
SpaceEEC
e677543c30 Allow to set the new game types via ClientUser#setPresence and ClientUser#setGame (#1782)
* Allow to set the new game types via ClientUser#setPresence and setGame

* Accept string version of types, fix options parameter, remove Presence#streaming

* One line if statement, don't reuse data.game when game is already reassigned and fix error message

* Removed redundant if statement
2017-08-17 18:27:32 +02:00
Gus Caplan
6065fe1f8c update image sizes, adding some more (#1781) 2017-08-15 21:55:07 +02:00
Gus Caplan
71f2cc10f1 add cover image (#1780)
* add cover image

* Update ClientApplication.js
2017-08-15 21:54:09 +02:00
Gus Caplan
57977b063e channel stuff (#1775)
* channel stuff

* abstract channel creation

* Update Channel.js

* Update Channel.js

* Update Channel.js

* Update Guild.js

* Update Constants.js

* e
2017-08-13 13:57:25 +02:00
SpaceEEC
b2c7fcb603 Add support for new game types (#1777) 2017-08-13 13:56:45 +02:00
Johnson Chen
9c52030c29 ClientUser Fixes (#1741)
* Fixes #1702

* Remove Comments

* Follow what Gus said... I hope

* JSDoc

* Update ClientUser.js

* TIL my knowledge about JSDocs was a lie
2017-08-12 12:01:43 +02:00
SpaceEEC
8034c0437d Fix VoiceChannel#setName and ChannelData#userLimit is a only voice thing (#1771) 2017-08-12 11:55:55 +02:00
Gus Caplan
fbdf028b86 :3 (#1774) 2017-08-12 10:58:51 +02:00
Gus Caplan
3ba224900f new application stuff very hype (#1764)
* application stuff, more to come

* docstrings

* Update Message.js
2017-08-11 19:09:06 +02:00
Gus Caplan
3c7869c1b7 update retry case for 5xx (#1765) 2017-08-10 20:31:45 +02:00
SpaceEEC
d9262f2682 Added and fixed a bunch of docs stuff (#1767)
- Fixed a common copy paste fail `the the <thing>` in various places
- Apparently I can't type Resolvable correctly,
Fixed that wherever applicable
- Documented GroupDMChannel#nicks so that it will be displayed on the docs
- GroupDMChannel#icon is nullable
- Removed empty InviteOptions typdef, as its properties are now documented in GuildChannel#createInvite
- MessageMentions#channels is no longer nullable
- RoleData#permissions takes a PermissionResolvable or an array of them
- Webhook#avatar is nullable
- Added HTTPOptions typedef and added it to ClientOptions typedef
- ClientUserChannelOverride#muted is for a channel and not a guild directly
2017-08-10 20:31:10 +02:00
SpaceEEC
fa5c4efa2b Fixed a bunch of ClientUserGuildSettings stuff and its docs (#1758) 2017-08-10 01:25:24 +02:00
SpaceEEC
87cdad332c Improved Guild#createChannel, added RoleResolvable and fixed a bit of Emoji stuff (#1754)
* Made creating channels with overwrites nicer
and added ClientDataResolver#resolveRole

* Renamed ChannelPermissionOverwrites to ChannelCreationOverwrites

* Added RoleResolvables everywhere possible

* Fixed Emoji#setName resetting restricted roles and Emoji#equals

Which will lead to emojis not to update when roles are being added removed.
2017-08-10 01:22:57 +02:00
SpaceEEC
48b69c6e2f No longer double increment the reaction count when the client reacts (#1755) 2017-08-10 01:21:34 +02:00
SpaceEEC
a49709d329 Readded permissions to Role#edit's payload (#1760) 2017-08-10 01:18:13 +02:00
Raphael
25dd3bc29e updated docs for <ReactionEmoji>.toString() so it now uses send instead sendMessage in example (#1761) 2017-08-10 01:17:12 +02:00
Schuyler Cebulskie
54ff8ce596 Fix tern file 2017-08-06 18:15:34 -04:00
Schuyler Cebulskie
3682918df9 Update typings 2017-08-06 18:09:58 -04:00
Isabella
62fc9fce6d Add Attachment structure (#1731)
* Add Attachment structure

* Fix linter issues + @private

* Fixed array sends, also added embed sends

* fixed proving path to attachment

* fixed incorrect name assumption from path

* linting fix

* ;)

* im really good at this

* changes as requested by gus

and computer from #1459

* am a dum

* update webhook#send

* readonly addition to getters

* i... uh... oops

* farming deez commits

* fix webhook split

* removed some ugly

* removed .every checks
2017-08-06 18:09:47 -04:00
SpaceEEC
317a352337 Fix ClientUser#settings not showing up in the documentation (#1757) 2017-08-05 15:41:00 +02:00
Gus Caplan
e5be902568 where we're going we don't need referrers (#1749) 2017-08-04 10:46:10 +02:00
Gus Caplan
dab28a0906 Stop creating package-lock.json once and for all (#1753) 2017-08-04 10:45:41 +02:00
Gus Caplan
e5386e33a8 default channel doesn't exist anymore (#1738) 2017-08-04 10:21:16 +02:00
FireController1847
580e066a36 Init pause variable on VoiceBroadcast (#1751)
* Init pause variable on VoiceBroadcast

* Move it back. Could have swore I did this.
2017-08-04 09:21:18 +02:00
Yoson Chiu
ba1c257bb2 Fixes #1693 (#1745)
* Update AudioPlayer.js

* Set timestamp to 0 as well.
2017-08-04 09:18:37 +02:00
SpaceEEC
abfda7c3cc Fixed ClientUser#createGroupDM on user accounts and added some more GroupDMChannel stuff (#1747)
* ClientUser#createGroupDM now works like the docs states on user accounts

* Added GroupDMChannel#setIcon and fixed null handling for the channel name

* Added an s

* Don't resolve when icon is falsy and removed useless name trimming

* Removed now unnecessary name constant

* vscode being great

* Added GroupDMChannel#iconURL
2017-08-04 09:17:46 +02:00
Will Nelson
a30fc87816 fix reply splitting (#1750) 2017-08-04 09:17:10 +02:00
Gus Caplan
fd11381cc5 fix more race conditions (#1740)
* Update ClientUser.js

* Update ClientUserGuildSettings.js
2017-08-01 05:42:22 +02:00
Gus Caplan
4b77f26851 Update ClientUser.js (#1739) 2017-08-01 05:35:59 +02:00
Gus Caplan
963cf42e0d add MessageMentions#has, remove old method (#1724)
* Update MessageMentions.js

* remove old method

* smh

* Update Message.js

* Update MessageMentions.js

* Update MessageMentions.js

* Update MessageMentions.js
2017-08-01 04:49:00 +02:00
Pg Biel
5799ba28f9 Fix Guild.equals (#1713) 2017-08-01 04:48:46 +02:00
Crawl
73761245cc Update typings 2017-08-01 04:41:26 +02:00
Crawl
bda72c60fa CRLF to LF 2017-08-01 04:40:39 +02:00
iCrawl
d4793bae0f Fix tiny doc string 2017-08-01 04:32:29 +02:00
stupid cat
b8034525e3 Add user_guild_settings support (#1365)
* user guild settings

* Use direct collection

* I'm a goof

* double goof

* Structure properties

* Forgot to register listener

* wrong class names

* No more get in docs

* avoid waterfalls, bot checks

* trycatch

wow i thought i already did this :notlikecat:

* 👀

* Update ClientUser.js

* Update ClientUserGuildSettings.js

* Update UserGuildSettingsUpdate.js

* Update ClientUserChannelOverride.js

* Update ClientUserGuildSettings.js
2017-08-01 04:28:15 +02:00
tjpc3
4f5d1bffaf fix node.js crash due to error messages being called with invalid error keys (#1728)
* Comments

* More Comments

* Added new error message

* Fixed error message

* Removing temporary comments

* Fixed error messages

* Added more new error messages

* Removed trailing space

* Removed other trailing space

* Changed error key

* Changed error key used
2017-08-01 04:01:45 +02:00
SpaceEEC
79fed1295c Fixed DiscordAPIError#message sometimes being undefined (#1735) 2017-07-31 01:18:55 +02:00
SpaceEEC
fe8f371d82 Fixed Client#guildMembersChunk's members collection's key being undefined. (#1736) 2017-07-31 01:16:50 +02:00
Gus Caplan
0acb0ac5dc fix unpack weird issues (#1729) 2017-07-29 22:02:56 +02:00
Schuyler Cebulskie
a46f606170 Fix Crawl/Drah garbage 2017-07-27 23:17:39 -04:00
Crawl
7b74b088ac Update nsfw prop 2017-07-28 04:53:23 +02:00
Pg Biel
eef87e5d97 Reasons (#1715)
* Add reasons

* How could I forget

* Hopefully fix conflicts
2017-07-27 03:14:04 +02:00
Raphael
27196c2f9f docs update to topics/voice playFile example (#1716)
* Update voice.md

* Update voice.md

* fixed my grammar

* added requested spaces
2017-07-27 03:13:35 +02:00
Gus Caplan
b2ab947180 fix guild audit log fetching of stuff (#1721)
* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* e
2017-07-27 03:12:41 +02:00
iCrawl
a8e77df168 Merge branch 'rewrite-ratelimit-route-builder' 2017-07-27 03:04:45 +02:00
Gus Caplan
91c9df2da3 Revert "Revert "retry on 500 (#1709)""
This reverts commit 317bf4f7cb.
2017-07-27 03:04:21 +02:00
Crawl
4adecf4aef rewrite ratelimiting and api route builder (#1667)
* rewrite ratelimiting and api route builder

* more stuff

* let people pass their own handlers

* Update burst.js

* Update RequestHandler.js

* Update burst.js

* Update sequential.js

* Update RequestHandler.js
2017-07-27 03:04:03 +02:00
bdistin
080996b5a9 fix sequential and burst ratelimiters from going on timeout because the queue is empty (#1722)
* create branch for me to work on

* fix sequential and burst ratelimiters from going on timeout because the queue is empty
2017-07-27 02:51:58 +02:00
Crawl
07178a0a2a Revert "rewrite ratelimiting and api route builder (#1667)"
This reverts commit a2eeafc75d.
2017-07-26 23:00:46 +02:00
Gus Caplan
317bf4f7cb Revert "retry on 500 (#1709)"
This reverts commit 57b6980313.
2017-07-26 23:00:08 +02:00
Will Nelson
8bd7b82110 update collectors (#1616)
* start new collector stuff

* bugfixes

* remove pointless cleanup method

* rename methods, events, and options; remove extraneous methods,

* update doc ref
2017-07-26 10:10:35 +02:00
aemino
e29a3ec08b Handle unexpected disconnects via packets (#1521) 2017-07-26 10:10:21 +02:00
aemino
4342ed29a8 Audio bitrate support (#1439)
* Audio bitrate support

Note: not implemented for VoiceBroadcasts

* Fix default args, auto bitrate

* Late night typos are the best

* Changes bitrate to kbps for VoiceChannel stuff

* Add methods to manipulate bitrate while encoding
2017-07-26 10:06:40 +02:00
Will Nelson
7eb9e65c41 check guild availability when aggregating client emojis (#1711) 2017-07-26 10:04:43 +02:00
SpaceEEC
278fe74a58 Adding reason parameter to GuildMember's methods (#1710)
* Added reason parameter to GuildMember's methods

* Reason parameters are optional
2017-07-26 10:04:25 +02:00
Gus Caplan
57b6980313 retry on 500 (#1709) 2017-07-22 23:21:50 +02:00
SpaceEEC
aeb8f85106 Guild#fetchMember's options paremeter should be optional (#1705) 2017-07-21 15:00:20 +02:00
Gus Caplan
a2eeafc75d rewrite ratelimiting and api route builder (#1667)
* rewrite ratelimiting and api route builder

* more stuff

* let people pass their own handlers

* Update burst.js

* Update RequestHandler.js

* Update burst.js

* Update sequential.js

* Update RequestHandler.js
2017-07-21 02:32:40 +02:00
SpaceEEC
11556c0b3b Moved all error strings to src/errors/messages and a few other things (#1695)
* Added missing error messages
As well as `Guild#setRolePosition` and `Guild#setChannelPosition`'s first arg validation
And fixed a typo in `Guild#setChannelPosition`
`roles` -> `channels`

* Reverted collection and Util constructors

* Removed leftover messages
Should have been in the second commit.

* It's a single invalid permission and removed unused flag error

* Fix INVALID_TOKEN -> TOKEN_INVALID as of #1703
2017-07-21 02:27:19 +02:00
Raphael
7a27b12b2b .applicationID and .ownerID return a Snowflake rather than a string (#1700) 2017-07-21 02:11:37 +02:00
Gus Caplan
8cf95dc9b3 update fetch member to work in a more consistent way (#1696)
* Update Guild.js

* Update Guild.js
2017-07-21 02:11:12 +02:00
Raphael
edfd50d003 afkChannelID returns a Snowflake rather than an string (#1697)
little update to <guild>.afkChannelID property in docs
2017-07-18 17:11:09 +02:00
Robin B
7f69c62ddc Fix docs for Application secret type (#1690)
Now a string (as supposed to be) instead of boolean.
2017-07-17 12:03:40 +02:00
meew0
2b230e8c6c Elaborate on the issue template checkboxes, fix spacing 2017-07-17 10:16:46 +02:00
SpaceEEC
fdb8f046b5 Fixing MessageEmbed's timestamp transforming (#1688)
when sending to discord
Also storing the timestamp in milliseconds when using setTimestamp
2017-07-16 17:55:51 +02:00
SpaceEEC
b7bbd395e8 Fix for GroupDMChannel#addUser and added removeUser, setName and edit (#1576)
* fixed GroupDMChannel#addUser, added setName and removeUser

and changed every `the Group DM`to `this Group DM`, for consistency

* added edit method

* delete method comes already with the Channel class

* brackets

* removed empty line
2017-07-16 14:15:54 +02:00
SpaceEEC
8580380541 fixed MessageEmbed#timestamp and changed attachFile to attachFiles (#1670)
* fixed MessageEmbed#timestamp and changed attachFile to attachFiles
as well as a few doc changes

* Embed#files shouldn't be a nested array
2017-07-16 14:11:49 +02:00
Gus Caplan
a965b3709a move nsfw to the new prop (#1687) 2017-07-16 14:04:40 +02:00
Raphael
111fa2da93 Fix typo in client.voiceConnections docs (#1679)
Fix typo in client.voiceConnections docs
2017-07-11 05:42:14 +02:00
FireController1847
e50bf2cdad Fix Recommended Shards (#1672) 2017-07-10 10:37:31 +01:00
SpaceEEC
c0e9ce2a1d functions for setTimeout should get the context bound and not applied (#1673) 2017-07-10 03:34:54 +02:00
Gus Caplan
4e5556ba09 important build stuff (#1663) 2017-07-08 07:16:46 +02:00
Crawl
116fcbd54e Oops, might use the right version number 2017-07-08 06:34:50 +02:00
Crawl
516c2025ba Use the uglifyjs-webpack-plugin beta on npm 2017-07-08 06:32:29 +02:00
Crawl
0c34f3a313 Update dependencies & make webpack great again 2017-07-05 11:53:53 +02:00
Gus Caplan
e3cd000ec0 update http options to fit discord spec (#1656)
* Update Constants.js

* Update APIRequest.js

* Update Invite.js

* Update Constants.js
2017-07-05 09:10:06 +01:00
Gus Caplan
bcbf834c95 use webhooks cache in guild audit log (#1660)
* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js
2017-07-05 09:08:13 +01:00
Gus Caplan
7f809395af add new unique property (#1659) 2017-07-05 09:02:40 +01:00
Gus Caplan
39a3e72894 allow content in edit options like in message send options (#1657) 2017-07-05 09:01:07 +01:00
Gus Caplan
f8a1f2c23b fix this again (#1655) 2017-07-04 03:58:54 +02:00
Gus Caplan
e57bfc9313 undefined check to merge default (#1654) 2017-07-04 03:48:20 +02:00
Drahcirius
b1d9084345 Remove RichEmbed in favour of MessageEmbed (#1584)
* remove RichEmbed in favour of MessageEmbed

* fix provider typo
2017-07-04 00:53:22 +02:00
SpaceEEC
c42e53d70d Fixed User#fetchProfile, UserProfile#premium and added #flags (#1629)
* Fixed User#fetchProfile, UserProfile#premium and added #flags

* made UserProfile#flags a getter and stored the raw bitfield under UserProfile#_flags

* lowercased Flags
2017-07-04 00:28:53 +02:00
SpaceEEC
3da95d7e68 Corrected some docstrings (#1611)
* corrected some docstrings

* merge master

* fixed MessageSearchResult typedef and moved the note for the hit property to there
2017-07-04 00:22:48 +02:00
Gus Caplan
2eb3720001 move raw call so that any cache events happen before (#1653)
* move raw call so that any cache events happen before

* Update WebSocketConnection.js

* Update WebSocketConnection.js
2017-07-04 00:10:28 +02:00
aemino
afcf43aef6 Add VoiceConnection errors (#1649) 2017-07-04 00:09:38 +02:00
SpaceEEC
1c901cee7b Fixed wrong parenthesis for Webhook#send and Webhook#sendSlackMessage (#1648) 2017-07-04 00:09:07 +02:00
SpaceEEC
3fa880df5b Made (hopefully) all url related methods accept an options objects (#1617)
and removed a leftover in User#avatarURL
2017-07-04 00:08:24 +02:00
SpaceEEC
ee3a2415e4 Removed deprecated file option from MessageOptions (#1614) 2017-07-04 00:06:29 +02:00
bdistin
d266804953 rest api route fixes (#1645)
* start of the rest api router fixes.

* fix more missed code
2017-07-02 09:43:10 +01:00
bdistin
8da557faab Fix client.fetchApplication (#1644)
previously it returned: `this.api.oauth2.applications was not a function`, missed fixing with the api router change
2017-07-02 01:33:21 +01:00
aemino
2b56de7728 Expose DiscordAPIError and API error constants (#1641)
* Expose DiscordAPIError

* Expose API error constants

* Add typedef for APIError

* Integligently forgot to save file
2017-07-02 01:20:35 +01:00
aemino
62537b7deb Ignore setSpeaking requests when VC isn't connected (#1638) 2017-07-01 10:14:41 +01:00
Gus Caplan
5ecd5f7d69 REST API speed improvement (#1577) 2017-07-01 10:14:17 +01:00
Gus Caplan
6bc7b3e068 add user account checkbox (#1640) 2017-07-01 10:11:15 +01:00
Gavin Wainwright
7b44262346 Destructure certain imports (#1634) 2017-06-29 00:43:26 +01:00
SpaceEEC
029efe5cb0 Fixed Guild#deleteEmoji, it's now using the emoji's id (#1633) 2017-06-28 18:17:57 +01:00
Gus Caplan
5891c0b4d7 update tern file to actually work (#1630) 2017-06-28 15:29:49 +01:00
Gus Caplan
ead6d80c36 Fix toLowerCase errors in GuildAuditLogs (#1627) 2017-06-28 15:27:29 +01:00
Drahcirius
45cc175851 setTimeout should use args (#1623) 2017-06-27 20:22:17 +01:00
Will Nelson
0a337a4646 make token not enumerable (#1620) 2017-06-25 20:48:30 +01:00
Gus Caplan
63e54982f4 Errors Standardization (#1246)
* errors and stuff

* more errors

* all the errors

* fix build
2017-06-25 18:48:05 +01:00
Gus Caplan
602fe06f88 update docs for discord api error (#1575)
* aaaaa

* Update DiscordAPIError.js
2017-06-24 23:36:48 +01:00
Gus Caplan
cada8763a9 clean up cdn resources (#1597)
* Create Constants.js

* Update Constants.js
2017-06-24 23:32:48 +01:00
aemino
4ae4c97589 Fix VoiceConnection#authenticateFailed race condition (#1601) 2017-06-24 23:28:49 +01:00
SpaceEEC
201ecd25a2 renamed OAuth2Application#reset to resetSecret and added resetToken (#1541) 2017-06-24 23:26:09 +01:00
Gus Caplan
7f8cc9c297 sanity changes to search (#1593)
* Create Search.js

* Create Guild.js

* Create TextBasedChannel.js

* Create Search.js

* Create Search.js

* Create Guild.js

* Create TextBasedChannel.js

* Create Search.js
2017-06-24 23:23:45 +01:00
Mythic
fd79539ec3 Improve Message's ID attribute documentation (#1450)
Remove the implication that a Message object's ID is unique only to the channel it was sent on
Message ID's are snowflakes, and as stated in Discord's API documentation, globally unique throughout Discord
2017-06-24 23:21:21 +01:00
Morgan (Fallen)
e506995e4f Update voice and shard examples (#1608)
* Update voice.js

message.channel.sendMessage(...) to message.channel.send(...)

* Update shard.js

message.channel.sendMessage(...) to message.channel.send(...)

* Update voice.js

* Update shard.js

* Update voice.js
2017-06-24 23:20:29 +01:00
Mstrodl
1fadd0f859 Update avatar example for v12.0 (#1610)
User.displayAvatarURL was changed from a property to a method so I changed the example accordingly
2017-06-24 23:12:22 +01:00
SpaceEEC
e671a010cb added Guild#setExplicitContentFilter (#1583) 2017-06-24 23:03:37 +01:00
SpaceEEC
4f23822264 Wait for the websocket event when creating a guild (#1524)
* Wait for the websocket event when creating a guild

* using TOOK_TOO_LONG error

* resolve after timeout with an unavailable guild object
2017-06-23 20:49:56 +01:00
Gus Caplan
66cc5b2b53 URI Encoding for reasons (#1606) 2017-06-17 10:47:37 +01:00
SpaceEEC
00eebd34cb Correctly mapping overwrites when creating a channel and renamed all relevant property names as of #1562 (#1570)
* using correct properties to apply permissionOverwrites

and fixed `GuildChannel#clone`

* also arrays should be mapped and correct properties taking priority

* changed .deny and .allow to .denied and .allowed respectively

* whoops
2017-06-16 12:49:13 +02:00
DeJay
35e8601b3a Replacing ticks (#1589)
http://i.imgur.com/7Xbaawm.png
2017-06-13 21:55:54 +02:00
SpaceEEC
ecb8424f52 fixed typo in Guild#createEmoji (#1588) 2017-06-12 11:26:36 -04:00
Amish Shah
b694ab1b80 Add internal sharding options 2017-06-11 11:36:58 +01:00
Drahcirius
355b1cca4a Remove global flag from ffmpeg tutorial doc (#1582) 2017-06-10 23:54:17 +01:00
SpaceEEC
d6041f9fb3 Added Client#status and Message#type typedefs (#1571)
* typedef for MessageTypes and linked Client#status to Status

* should be singular

* typedef for Voiceconnection#status
2017-06-09 16:27:49 +02:00
Crawl
7b3a005b65 Remove createCollector from all channels 2017-06-08 14:51:21 +02:00
Crawl
0898e1dd5b Fix createMessageCollector example 2017-06-08 14:50:26 +02:00
Schuyler Cebulskie
3bf8192812 Switch to User#tag in web builds example 2017-06-07 23:00:43 -04:00
Évelyne Lachance
06f4c679d3 Add count optional argument to Collection methods (#1552)
* Add `count` optional argument to Collection methods

[NON-BREAKING CHANGE]
An optional `count` argument is added to the following methods:
- random() and randomKey()
- first() and firstKey()
- last() and lastKey()

If `count` is used, the method returns an array instead of only the value. Performance impact non-existent for existing code. Performance for returning an array has been measured and this is the fastest I could find (array[i] = value is faster than array.push()).

* Update Collection.js

Fixed spacing/line length errors according to suggestions by codacy/pr

* Fixed docs

Added proper `@returns {*|Array}` as the methods might return either. Also added params where missing (whoops)

* Further doc fixes

Per Crawl's comments, fixed (i + 1) spacing as well as fixed {Integer} to {number}

* random() and randomKey() fix

Per Hydra's comment, random() and randomKey() now ensures unique values.
I've also resolved potential issues with requesting a count higher than the collection size. A collection with 10 items will only ever return at most 10 items using the `count` property.

* Can I facepalm harder

Had wrong header comments ^_^

* Fixed for "values/value" and Omited

Also, added "Positive" integer check.

* looks like I "omitted" a change, there.

* Update Collection.js

* Update Collection.js

* Update Collection.js
2017-06-07 18:52:41 -04:00
FireController1847
1e47cfdd5d Add denied/allowed permissions to PermissionOverwrites (#1562)
* Add denied/allowed permissions to PermissionOverwrites

* Remove one accidental trailing space.

* Change to _denied/_allowed & denied/allowed

This could possible break if people use deny/allow, I assume, but that's okay.

* Update PermissionOverwrites.js

* Update PermissionOverwrites.js
2017-06-07 23:47:45 +02:00
SpaceEEC
577ab37a2b make User#displayAvatarURL a method and make it and avatarURL accept an options object (#1569)
* make User#displayAvatarURL a method

* make avatarURL and displayAvatarURL accept an object as options
2017-06-07 23:47:17 +02:00
aemino
4e79a885b8 Remove unused VoiceBroadcast#guaranteeOpusEngine (fixes #1556) (#1563) 2017-06-05 06:52:31 +02:00
Schuyler Cebulskie
28dc3e6a2e Utilise Object.values for Permissions.ALL 2017-06-02 00:36:34 -04:00
Schuyler Cebulskie
2f2481c65e Clean up Travis stuff MOAR 2017-06-02 00:34:18 -04:00
Schuyler Cebulskie
92e9c61eb6 Betterer Travis? Maybe? 2017-06-02 00:25:13 -04:00
Schuyler Cebulskie
2a96296e95 Identify version as development 2017-06-02 00:19:02 -04:00
Schuyler Cebulskie
45cf05746d Revise Travis scripts, and use only Node 8 2017-06-02 00:12:27 -04:00
Gus Caplan
a2520efa1a Use node 8 error code (#1557) 2017-06-01 21:14:42 +02:00
Crawl
37d6624ef1 Fix CRLF to LF 2017-06-01 10:45:56 +02:00
Crawl
375b89a94a Force node 8 2017-06-01 10:42:35 +02:00
Gus Caplan
63f5652ac2 object.entries (#1549)
* Update DiscordAPIError.js

* Update ClientUserSettings.js
2017-06-01 10:38:34 +02:00
aemino
c4a7ce12e6 Opus engine fetching: don't ignore non-missing errors (#1555)
* Opus engine fetching: don't ignore non-missing errors

* typo fix
2017-06-01 10:29:55 +02:00
Marko Kajzer
c84529c102 Fixes #1548 (#1551)
* Added possibility to remove avatar

* Changed as requested

* Removed extra blank line
2017-06-01 06:06:46 +02:00
Amish Shah
980b58d4df Ignore package-lock.json 2017-05-30 23:32:54 +01:00
Crawl
47029feafa Bump to node 8 2017-05-30 21:25:53 +02:00
Tyler
7896081966 Fix <Role>.editable (#1547) 2017-05-30 15:36:04 +02:00
Gus Caplan
68c25fef28 Update Guild.js (#1545) 2017-05-30 15:34:06 +02:00
Amish Shah
535a640534 Update ws and tweetnacl dependencies to new major versions 2017-05-30 12:51:31 +01:00
Amish Shah
6cc74d22ff fml 2017-05-30 12:22:40 +01:00
Amish Shah
8f63368696 Correct documentation for VoiceConnection (see #1536) 2017-05-30 12:21:37 +01:00
Snazzah
29ead897d6 Add MEMBER_ROLE_UPDATE to returning 'UPDATE' array (#1538) (#1542) 2017-05-29 23:53:23 +02:00
Drahcirius
20a9e4a0f8 .send() not working on members (#1539) 2017-05-29 15:19:42 +02:00
Gus Caplan
1aa2293ebf add nsfw option to search (#1534)
* Update Search.js

* Update TextBasedChannel.js

* Update Search.js
2017-05-29 15:19:31 +02:00
PhoenixShay
22e8237bf1 Fix Util.js : fetchRecommendedShards() (#1532)
* Fix Util.js : fetchRecommendedShards()

I'm not sure who thought this was a good idea, but by removing gateway, it broke fetchRecommendedShards() in Util.js as it uses ${Constants.Endpoints.gateway.bot}.

* Update Constants.js

* Update Constants.js

* Update Util.js

* Update Constants.js
2017-05-28 22:54:56 +02:00
Drahcirius
555317043e Message embeds (#1529)
* wowe

* fix sending

* Update MessageEmbed.js

* lel

* patched some fields for message embed and transforms edits as well

* webhook embeds transform

* apply transform to webhook embeds, and changed references

* Update MessageEmbed.js

* Update ClientDataResolver.js

* updated embeds params and use new util resolvers

* did not mean to add this back

* use master version of ClientDataResolver

* transform no longer needed
2017-05-28 03:34:30 +02:00
SpaceEEC
afe0bd8bc4 User#defaultAvatarURL should use CDN (#1531) 2017-05-27 22:04:19 +02:00
Amish Shah
ee679c7320 Fix #1528 2017-05-27 19:19:35 +01:00
Drahcirius
4292134647 Refactored static resolvers to Util (#1517)
* ready event will now throw errors properly

* ws login rejection fix

* moved static resolves to util
2017-05-23 12:18:18 +02:00
Crawl
7309e367f1 Update typings 2017-05-23 11:14:25 +02:00
Crawl
05a9f7e72f Remove duplicate resolveString call 2017-05-22 01:04:27 +02:00
bdistin
75eb0bae58 Add resolve content back into send (#1516)
so arrays are joined again, instead of sent as one new message per element
2017-05-22 01:02:08 +02:00
Gus Caplan
694f8278f1 make fetching members way better (#1124)
* make fetching members way better

* fix up fetching edge cases yet again

* stop making useless collections

* Update Guild.js

* Update Guild.js

* consistency?

* Update GuildMembersChunk.js

* Update Guild.js

* Update Guild.js

* Open editor to fix issues instead of GH: check
2017-05-21 22:09:37 +02:00
SpaceEEC
fce15ba33c Fix for bulkDelete, acknowledge, createInvite and remove some redundant stuff (#1515) 2017-05-21 22:04:57 +02:00
Gus Caplan
a0df2c5fa4 they can be more than just string/num/bool (#1448) 2017-05-21 21:24:36 +02:00
bdistin
ec5da9e6ad Fix trying to use this.client, when this IS client, and this.client i… (#1514) 2017-05-21 21:12:49 +02:00
vzwGrey
874e94992b Fix reaction collector example (#1513) 2017-05-21 18:56:17 +02:00
Gus Caplan
0baa59b679 Internal API Request Rewrite (#1490)
* start rewrite

* converted guilds

* more changes

* convert GuildMember

* convert User and remove friend methods which kill people

* convert more stuff

* even more stuff

* make things nicer

* speed and fixes and stuff

* almost finished

* fix

* Update Client.js

* uwu

* Update RESTMethods.js

* message editing

* fix router

* fix issue with references

* message delete reason

* move message sending

* fix dm

* message splitting

* NO MORE REST METHODS

* Update Client.js

* Update WebhookClient.js

* remove all those endpoints from the constants

* Update ClientUser.js

* Update ClientUser.js

* fixes

* Update ClientUser.js

* complaiancy

* all sort of fixes

* merge master (#1)

* Fix Permissions now that member is deprecated (#1491)

* removing more deprecation leftovers (#1492)

* Fix MessageCollectors

* Fix awaitMessages (#1493)

* Fix MessageCollector#cleanup

* Fix MessageCollector#postCheck

* Add max option back for safety

* Update Invite.js (#1496)

* guild setPosition missing docs (#1498)

* missing docs

* update return docs

* indent

* switched .invites for the apirouter and invite.js

* make multiple options an object

* Update ClientUser.js

* fix nicks

* Update WebhookClient.js
2017-05-21 07:04:19 +02:00
Crawl
02f03c439f Update typings 2017-05-21 06:41:25 +02:00
Gus Caplan
7934788c10 you can't mutate a socket event in some browsers (webpack fix) (#1512) 2017-05-21 05:19:53 +02:00
Crawl
79253544ea Relink permission#FLAGS on docs 2017-05-20 21:04:31 +02:00
Crawl
284bec80d4 Fix MessageCollectorOptions docs 2017-05-20 00:03:51 +02:00
bdistin
4aa734b9ef guild setPosition missing docs (#1498)
* missing docs

* update return docs
2017-05-16 16:11:11 +02:00
Gus Caplan
3fa87de594 Update Invite.js (#1496) 2017-05-16 15:25:42 +02:00
Crawl
4955b1ce5f Add max option back for safety 2017-05-16 04:58:13 +02:00
Crawl
8beefe66d5 Fix MessageCollector#postCheck 2017-05-16 04:47:53 +02:00
Crawl
20a267c12f Fix MessageCollector#cleanup 2017-05-15 01:33:10 +02:00
Daniel Odendahl
88444cdd26 Fix awaitMessages (#1493) 2017-05-15 01:04:57 +02:00
Crawl
a579967eb9 Fix MessageCollectors 2017-05-15 00:48:35 +02:00
SpaceEEC
37a3a6baf9 removing more deprecation leftovers (#1492) 2017-05-14 23:44:39 +02:00
bdistin
25096047f1 Fix Permissions now that member is deprecated (#1491) 2017-05-14 22:40:06 +02:00
Crawl
ca926ee404 Remove all deprecated methods / props 2017-05-14 20:15:55 +02:00
Gus Caplan
4422f2aa8a fix infinte loop issue (#1488) 2017-05-14 19:33:04 +02:00
Crawl
342c644043 Improve avatar example 2017-05-14 19:30:23 +02:00
Crawl
5db3ab742b Update travis build stages 2017-05-13 19:09:26 +02:00
Crawl
833bfa1cba Move node versions 2017-05-13 19:04:30 +02:00
Crawl
b4645685aa Improve test and build scripts 2017-05-13 18:58:56 +02:00
Crawl
eab5c9e7f1 Add tarvis staging 2017-05-13 18:42:15 +02:00
Crawl
b0d4b53d6b Fix webpack uglify 2017-05-13 18:17:25 +02:00
Gus Caplan
6ac2252794 make default avatar resolving better (#1484)
* Update Constants.js

* Update User.js

* Update Constants.js

* Update Constants.js
2017-05-13 17:41:32 +02:00
SpaceEEC
ff3e602134 Failing to resolve a role should reject and not throw an error (#1483) 2017-05-12 15:30:46 +02:00
aemino
ff82297073 GuildMember#setVoiceChannel fix (#1482)
Looks like someone forgot to remove the full channel object from the PATCH payload.
2017-05-12 06:41:40 +02:00
Drahcirius
d11a658f40 invalid token errors not rejected properly (#1478)
* ready event will now throw errors properly

* ws login rejection fix
2017-05-10 11:14:39 -04:00
meew0
83f2c62c3f Fix the mention example in the USERS_PATTERN doc comment
Previously it was a channel mention. Thanks @Hackzzila.
2017-05-10 13:11:21 +02:00
SpaceEEC
f95f18b586 Handing promise rejections from GuildAuditLogs#build to the user (#1474)
* handing guildauditlog's promise rejections to the user

* Returning a new Promise to resolve a Promise.all is unnecessary.
Also for the docs, it returns a Promise<GuildauditLogs>, not GuildAuditLogs directly.

* totally did not removed that line
2017-05-09 00:19:24 +02:00
1Computer1
6566c0d3c5 Deprecate aliases (#1469) 2017-05-06 01:22:15 +02:00
SpaceEEC
5bfc688bb0 Using a traditional for loop rather than a for in loop for options.files (#1461) 2017-05-06 01:09:01 +02:00
SpaceEEC
e66fa145d2 fix fetchMentions' auth header, options and data mapping (#1457)
* fix fetchMentions' auth header, options and data mapping

* vscode strikes again

* switched to Util.mergeDefault

* vscode

* removed duplicated optionals and switched to instanceof
2017-05-06 01:04:12 +02:00
SpaceEEC
d9e5bdea19 added Invite#presenceCount and Invite#memberCount (#1460)
* added Invite#online and Invite#memberCount

* requested change
2017-05-05 23:24:02 +02:00
SpaceEEC
a685d24504 using correct properties for invites (#1467) 2017-05-05 23:19:07 +02:00
SpaceEEC
a4e5713790 readded docs for Client#error and Client#ready (#1466) 2017-05-05 20:15:06 +02:00
SpaceEEC
128b4ee3e8 update GuildAuditLogs for MESSAGE_DELETE and fixed extras (#1464)
* update GuildAuditLogs for MESSAGE_DELETE and fixed extras

* correct oder of targets
2017-05-05 19:44:54 +02:00
Crawl
2a23941020 Update version 2017-05-05 17:08:41 +02:00
SpaceEEC
e6437388cf Endpoints.Guild(...).Emoji(...) should not use CDN (#1462) 2017-05-05 02:22:55 +02:00
Crawl
8c6167d35a Update welcome docs page 2017-05-05 01:56:00 +02:00
Gus Caplan
caf96339e0 Update GuildAuditLogs.js (#1456) 2017-05-04 00:50:08 +02:00
Anxeal
ac5d4d1050 Fix typo in RESTMethods.js (#1455)
Mentions should be written with a capital M
2017-05-03 20:35:24 +01:00
Anxeal
3d92c6d316 Fix typo in RESTMethods.js (#1454)
fetchMeMentions -> fetchMentions 🤔
2017-05-03 19:45:51 +01:00
SpaceEEC
07623d49e2 Fix for sending files with Webhook class (#1449) 2017-05-02 06:58:42 +01:00
Amish Shah
a7c902c6cf New is also optional 2017-05-01 22:11:04 +01:00
Amish Shah
b7a81ed7e1 watch me, gus 2017-05-01 22:07:20 +01:00
Amish Shah
7da53af0c3 Improve GuildAuditLogs documentation by creating an AuditLogChange typedef 2017-05-01 21:08:15 +01:00
Cody A. Taylor
e124ada962 Document flattenErrors keys param (#1447)
* Document flattenErrors keys param.

* Remove parens.

* Capitalise a letter
2017-05-01 20:49:45 +01:00
Gus Caplan
35ef9cd33d Add Guild#nameAcronym and make avatar/iconURLs into functions (#1144)
* Guild#iconURL(format, size);
* OAuth2Application#iconURL(format, size);
* User#iconURL(format, size);
2017-05-01 20:37:00 +01:00
1625 changed files with 177988 additions and 19377 deletions

12
.commitlintrc.json Normal file
View File

@@ -0,0 +1,12 @@
{
"$schema": "https://json.schemastore.org/commitlintrc.json",
"extends": ["@commitlint/config-angular"],
"rules": {
"type-enum": [
2,
"always",
["chore", "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "types", "typings"]
],
"scope-case": [0]
}
}

67
.dockerignore Normal file
View File

@@ -0,0 +1,67 @@
# Packages
**/node_modules
# Log files
**/logs
**/*.log
**/npm-debug.log*
# Runtime data
**/pids
**/*.pid
**/*.seed
# Env
**/.env
# Dist
**/dist/
**/dist-docs/
# Miscellaneous
**/.tmp
**/.vscode
**/.idea
**/.DS_Store
**/.turbo
**/tsconfig.tsbuildinfo
**/coverage
**/__tests__
**/out
# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Cache
**/.prettiercache
**/.eslintcache
**/.vercel
# Docker specific
**/.cliff-jumperrc.json
**/api-extractor.json
**/api-extractor-docs.json
**/.eslintignore
**/.eslintrc.json
**/.lintstagedrc.js
**/.lintstagedrc.cjs
**/.lintstagedrc.json
**/.prettierignore
**/.prettierrc.js
**/.prettierrc.cjs
**/.prettierrc.json
**/cliff.toml
**/CHANGELOG.md
**/README.md
**/LICENSE
**/tsconfig.eslint.json
**/tsconfig.docs.json
**/docs/
**/vitest.config.ts

View File

@@ -1,150 +0,0 @@
{
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6
},
"env": {
"es6": true,
"node": true
},
"rules": {
"no-await-in-loop": "warn",
"no-compare-neg-zero": "error",
"no-extra-parens": ["warn", "all", {
"nestedBinaryExpressions": false
}],
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
"valid-jsdoc": ["error", {
"requireReturn": false,
"requireReturnDescription": false,
"prefer": {
"return": "returns",
"arg": "param"
},
"preferType": {
"String": "string",
"Number": "number",
"Boolean": "boolean",
"Symbol": "symbol",
"object": "Object",
"function": "Function",
"array": "Array",
"date": "Date",
"error": "Error",
"null": "void"
}
}],
"accessor-pairs": "warn",
"array-callback-return": "error",
"complexity": "warn",
"consistent-return": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": "error",
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-multi-spaces": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-return": "error",
"no-void": "error",
"no-warning-comments": "warn",
"prefer-promise-reject-errors": "error",
"require-await": "warn",
"wrap-iife": "error",
"yoda": "error",
"no-label-var": "error",
"no-shadow": "error",
"no-undef-init": "error",
"callback-return": "error",
"handle-callback-err": "error",
"no-mixed-requires": "error",
"no-new-require": "error",
"no-path-concat": "error",
"array-bracket-spacing": "error",
"block-spacing": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"capitalized-comments": ["error", "always", { "ignoreConsecutiveComments": true }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"consistent-this": ["error", "$this"],
"eol-last": "error",
"func-names": "error",
"func-name-matching": "error",
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"indent": ["error", 2, { "SwitchCase": 1 }],
"key-spacing": "error",
"keyword-spacing": "error",
"max-depth": "error",
"max-len": ["error", 120, 2],
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"new-cap": "off",
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 3 }],
"no-array-constructor": "error",
"no-inline-comments": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-new-object": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
"object-curly-spacing": ["error", "always"],
"operator-assignment": "error",
"operator-linebreak": ["error", "after"],
"padded-blocks": ["error", "never"],
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"semi-spacing": "error",
"semi": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", "never"],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"template-tag-spacing": "error",
"unicode-bom": "error",
"arrow-body-style": "error",
"arrow-parens": ["error", "as-needed"],
"arrow-spacing": "error",
"no-duplicate-imports": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"prefer-arrow-callback": "error",
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"rest-spread-spacing": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error"
}
}

1
.gitattributes vendored
View File

@@ -1 +1,2 @@
* text=auto eol=lf
pnpm-lock.yaml linguist-generated=true text=auto eol=lf

11
.github/.kodiak.toml vendored Normal file
View File

@@ -0,0 +1,11 @@
version = 1
[merge]
require_automerge_label = false
blocking_labels = ['blocked', 'in review']
method = 'squash'
[merge.message]
title = 'pull_request_title'
strip_html_comments = true
include_coauthors = true

28
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,28 @@
# Learn how to add code owners here:
# https://help.github.com/en/articles/about-code-owners
* @iCrawl
/apps/guide/ @discordjs/website @discordjs/guide
/apps/guide/src/content/ @discordjs/guide
/apps/website/ @discordjs/website
/packages/actions/ @discordjs/actions
/packages/api-extractor-utils/ @discordjs/api-extractor-utils
/packages/brokers/ @discordjs/brokers
/packages/builders/ @discordjs/builders
/packages/collection/ @discordjs/collection
/packages/core/ @discordjs/core
/packages/create-discord-bot/ @discordjs/guide
/packages/discord.js/ @discordjs/core
/packages/docgen/ @iCrawl
/packages/formatters/ @discordjs/formatters
/packages/next/ @discordjs/core
/packages/proxy/ @discordjs/proxy
/packages/proxy-container/ @discordjs/proxy
/packages/rest/ @discordjs/rest
/packages/scripts/ @discordjs/scripts
/packages/ui/ @discordjs/ui
/packages/util/ @discordjs/util
/packages/voice/ @discordjs/core
/packages/ws/ @discordjs/ws

76
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at https://discord.gg/djs. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

91
.github/COMMIT_CONVENTION.md vendored Normal file
View File

@@ -0,0 +1,91 @@
## Git Commit Message Convention
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
#### TL;DR:
Messages must be matched by the following regex:
```js
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,72}/;
```
#### Examples
Appears under "Features" header, `GuildMember` subheader:
```
feat(GuildMember): add 'tag' method
```
Appears under "Bug Fixes" header, `Guild` subheader, with a link to issue #28:
```
fix(Guild): handle events correctly
close #28
```
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
```
perf(core): improve patching by removing 'bar' option
BREAKING CHANGE: The 'bar' option has been removed.
```
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
```
revert: feat(Managers): add Managers
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
```
### Full Message Format
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
### Revert
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Type
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
### Scope
The scope could be anything specifying the place of the commit change. For example `GuildMember`, `Guild`, `Message`, `TextChannel` etc...
### Subject
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

View File

@@ -1,17 +1,49 @@
# Contributing
**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/bRCvFy9) instead of opening an issue you will get redirected there anyway.**
**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/djs) instead of opening an issue you will get redirected there anyway.**
If you wish to contribute to the discord.js codebase or documentation, feel free to fork the repository and submit a
pull request. We use ESLint to enforce a consistent coding style, so having that set up in your editor of choice
is a great boon to your development process.
## Setup
To get ready to work on the codebase, please do the following:
1. Fork & clone the repository, and make sure you're on the **master** branch
2. Run `npm install`
3. If you're working on voice, also run `npm install node-opus` or `npm install opusscript`
1. Fork & clone the repository, and make sure you're on the **main** branch
2. Run `pnpm install --frozen-lockfile` ([install](https://pnpm.io/installation))
3. Run `pnpm run build` to build local packages
4. Code your heart out!
5. Run `npm test` to run ESLint and ensure any JSDoc changes are valid
6. [Submit a pull request](https://github.com/hydrabolt/discord.js/compare)
5. Run `pnpm run test` to run ESLint and ensure any JSDoc changes are valid
6. [Submit a pull request](https://github.com/discordjs/discord.js/compare) (Make sure you follow the [conventional commit format](https://github.com/discordjs/discord.js/blob/main/.github/COMMIT_CONVENTION.md))
## Testing changes locally
If you want to test changes you've made locally, you can do so by using `pnpm link <package-you-want-to-link-to-your-current-package>`. This will create a symlink to your local copy of the discord.js libraries.
1. Create a new directory `mkdir discordjs-test` and move into it `cd discordjs-test`
2. Initialize a new pnpm project `pnpm init`
3. Now link the discord.js package from the directory you cloned earlier `pnpm link {PATH_TO_DISCORDJS_REPO}/packages/<package>`. (e.g. `pnpm link ~/discord.js/packages/rest`)
4. Import the package in your source code and test them out!
### Working with TypeScript packages
When testing local changes, you may notice you need to manually recompile TypeScript projects on every change in order to get the latest code changes to test locally.
To avoid this you can use the `--watch` parameter in the package build script to automatically recompile the project when changes are detected.
For example, to automatically recompile the `@discordjs/rest` project when changes are detected, run `pnpm turbo run build --filter='@discordjs/rest' -- --watch` in the root folder of where you cloned the discord.js repo.
## Adding new packages
If you'd like to create another package under the `@discordjs` organization run the following command:
```sh
pnpm run create-package <package-name> [package-description]
```
This will create new package directory under `packages/` with the required configuration files. You may begin
to make changes within the `src/` directory. You may also need to:
- Update workflows that utilize packages
- Update the CODEOWNERS file

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
github: [iCrawl, amishshah, vladfrangu, kyranet]
open_collective: discordjs

View File

@@ -1,26 +0,0 @@
<!--
If you need help with discord.js installation or usage, please go to the discord.js Discord server instead:
https://discord.gg/bRCvFy9
This issue tracker is only for bug reports and enhancement suggestions. You won't receive any basic help here.
-->
**Please describe the problem you are having in as much detail as possible:**
**Include a reproducible code sample here, if possible:**
```js
```
**Further details:**
- discord.js version:
- node.js version:
- Operating system:
- Priority this issue should have please be realistic and elaborate if possible:
<!--
Ideally you would also test whether the issue occurs on the latest master branch commit.
If you have, please check the following box and insert the hash of the commit you tested:
-->
- [ ] I have also tested the issue on latest master, commit hash:

View File

@@ -0,0 +1,139 @@
name: Bug report
description: Report an issue with discord.js or another package.
labels: [bug, need repro]
body:
- type: markdown
attributes:
value: |
Thank you for filing an issue! If you are here to ask a question, use Discord instead: https://discord.gg/djs
This issue form is for discord.js, including other packages.
- type: dropdown
id: package
attributes:
label: Which package is this bug report for?
options:
- discord.js
- brokers
- builders
- collection
- core
- create-discord-bot
- formatters
- next
- proxy
- proxy-container
- rest
- ui
- util
- voice
- ws
validations:
required: true
- type: textarea
id: description
attributes:
label: Issue description
description: Describe the issue in as much detail as possible.
placeholder: |
Steps to reproduce with below code sample:
1. Do thing
2. Do thing in Discord client
3. Observe behavior
4. See error logs below
validations:
required: true
- type: textarea
id: code_sample
attributes:
label: Code sample
description: |
Your code sample should be:
1. Minimal - Use as little code as possible that still produces the same problem (and is understandable)
2. Complete - Provide all parts someone else needs to reproduce your problem
3. Reproducible - Test the code you're about to provide to make sure it reproduces the problem
This will be automatically formatted into code, so no need for backticks.
render: typescript
- type: textarea
id: versions
attributes:
label: Versions
description: List necessary versions here. This includes your package version, runtime version, operating system etc.
placeholder: |
- discord.js 14.12.1 (`npm ls discord.js` or another package)
- Node.js 16.11.0 (`node --version`)
- TypeScript 5.1.6 (`npm ls typescript` if you use it)
- macOS Ventura 13.3.1
validations:
required: true
- type: dropdown
id: priority
attributes:
label: Issue priority
description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above.
options:
- Low (slightly annoying)
- Medium (should be fixed soon)
- High (immediate attention needed)
validations:
required: true
- type: dropdown
id: partials
attributes:
label: Which partials do you have configured?
description: Check your `Client` constructor for the `partials` key.
options:
- Not applicable
- No Partials
- User
- Channel
- GuildMember
- Message
- Reaction
- GuildScheduledEvent
- ThreadMember
multiple: true
validations:
required: true
- type: dropdown
id: intents
attributes:
label: Which gateway intents are you subscribing to?
description: Check your `Client` constructor for the `intents` key.
options:
- Not applicable
- No Intents
- Guilds
- GuildMembers
- GuildModeration
- GuildEmojisAndStickers
- GuildIntegrations
- GuildWebhooks
- GuildInvites
- GuildVoiceStates
- GuildPresences
- GuildMessages
- GuildMessageReactions
- GuildMessageTyping
- DirectMessages
- DirectMessageReactions
- DirectMessageTyping
- MessageContent
- GuildScheduledEvents
- AutoModerationConfiguration
- AutoModerationExecution
- GuildMessagePolls
- DirectMessagePolls
multiple: true
validations:
required: true
- type: input
id: dev_release
attributes:
label: I have tested this issue on a development release
placeholder: d23280c (commit hash)
description: |
The issue might already be fixed in a development release or main. This is not required, but helps us greatly.
[discord.js only] To install the latest development release run `npm i discord.js@dev` in your project directory.
Run `npm list discord.js` and use the last part of the printed information (`d23280c` for `discord.js@xx.x.x-dev.1530234593.d23280c`)

View File

@@ -0,0 +1,58 @@
name: Websites bug report
description: Report an issue with the documentation or guide websites.
labels: [bug, need repro]
body:
- type: markdown
attributes:
value: |
Thank you for filing an issue! If you are here to ask a question, use Discord instead: https://discord.gg/djs
This issue form is for our documentation and guide websites.
- type: dropdown
id: application
attributes:
label: Which application is this bug report for?
options:
- Documentation
- Guide
validations:
required: true
- type: textarea
id: description
attributes:
label: Issue description
description: Describe the issue in as much detail as possible.
validations:
required: true
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to Reproduce
description: What steps must be taken to reproduce this issue?
placeholder: |
1. Visit a page
2. Click a link
3. ...
validations:
required: true
- type: textarea
id: versions
attributes:
label: Versions
description: List necessary versions here. This includes your browser, operating system etc.
placeholder: |
- Safari 16.4 (18615.1.26.11.23)
- macOS Ventura 13.3.1
validations:
required: true
- type: dropdown
id: priority
attributes:
label: Issue priority
description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above.
options:
- Low (slightly annoying)
- Medium (should be fixed soon)
- High (immediate attention needed)
validations:
required: true

View File

@@ -0,0 +1,59 @@
name: Feature request
description: Request a new feature (discord.js accepts documented features of the official Discord developer API only!)
labels: [feature request]
body:
- type: markdown
attributes:
value: |
We can only implement features that Discord publishes, documents, and merges into the Discord API documentation.
We do not implement unreleased features.
Use Discord for questions: https://discord.gg/djs
- type: dropdown
id: application_or_package
attributes:
label: Which application or package is this feature request for?
options:
- discord.js
- Documentation
- Guide
- brokers
- builders
- collection
- core
- create-discord-bot
- formatters
- next
- proxy
- proxy-container
- rest
- ui
- util
- voice
- ws
validations:
required: true
- type: textarea
id: description
attributes:
label: Feature
description: A clear and concise description of what the problem is, or what feature you want to be implemented.
placeholder: I'm always frustrated when..., Discord has recently released..., A good addition would be...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Ideal solution or implementation
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternative solutions or implementations
description: A clear and concise description of any alternative solutions or features you have considered.
- type: textarea
id: additional_context
attributes:
label: Other context
description: Any other context, screenshots, or file uploads that help us understand your feature request.

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discord server
url: https://discord.gg/djs
about: Please visit our Discord server for questions and support requests.

View File

@@ -1,7 +1,12 @@
**Please describe the changes this PR makes and why it should be merged:**
**Status and versioning classification:**
**Semantic versioning classification:**
- [ ] This PR changes the library's interface (methods or parameters added)
- [ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
- [ ] This PR **only** includes non-code changes, like changes to documentation, README, etc.
<!--
Please move lines that apply to you out of the comment:
- Code changes have been tested against the Discord API, or there are no code changes
- I know how to update typings and have done so, or typings don't need updating
- This PR changes the library's interface (methods or parameters added)
- This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
- This PR **only** includes non-code changes, like changes to documentation, README, etc.
-->

7
.github/SUPPORT.md vendored Normal file
View File

@@ -0,0 +1,7 @@
# Seeking support?
We only use this issue tracker for bug reports and feature request. We are not able to provide general support or answer questions in the form of GitHub issues.
For general questions about discord.js installation and use please use the dedicated support channels in our Discord server: https://discord.gg/djs
Any issues that don't directly involve a bug or a feature request will likely be closed and redirected.

51
.github/issue-labeler.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
apps:guide:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nGuide\\n"
apps:website:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nDocumentation\\n"
packages:brokers:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nbrokers\\n"
packages:builders:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nbuilders\\n"
packages:collection:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ncollection\\n"
packages:core:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ncore\\n"
packages:create-discord-bot:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ncreate-discord-bot\\n"
packages:discord.js:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ndiscord.js\\n"
packages:formatters:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nformatters\\n"
packages:next:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nnext\\n"
packages:proxy:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nproxy\\n"
packages:proxy-container:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nproxy-container\\n"
packages:rest:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nrest\\n"
packages:ui:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\ui\\n"
packages:util:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\util\\n"
packages:voice:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nvoice\\n"
packages:ws:
- "### Which (application|package|application or package) is this (bug
report|feature request) for\\?\\n\\nws\\n"

60
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
apps:guide:
- apps/guide/*
- apps/guide/**/*
apps:website:
- apps/website/*
- apps/website/**/*
packages:api-extractor:
- packages/api-extractor/*
- packages/api-extractor/**/*
packages:api-extractor-model:
- packages/api-extractor-model/*
- packages/api-extractor-model/**/*
packages:brokers:
- packages/brokers/*
- packages/brokers/**/*
packages:builders:
- packages/builders/*
- packages/builders/**/*
packages:collection:
- packages/collection/*
- packages/collection/**/*
packages:core:
- packages/core/*
- packages/core/**/*
packages:create-discord-bot:
- packages/create-discord-bot/*
- packages/create-discord-bot/**/*
packages:discord.js:
- packages/discord.js/*
- packages/discord.js/**/*
packages:docgen:
- packages/docgen/*
- packages/docgen/**/*
packages:formatters:
- packages/formatters/*
- packages/formatters/**/*
packages:next:
- packages/next/*
- packages/next/**/*
packages:proxy:
- packages/proxy/*
- packages/proxy/**/*
packages:proxy-container:
- packages/proxy-container/*
- packages/proxy-container/**/*
packages:rest:
- packages/rest/*
- packages/rest/**/*
packages:ui:
- packages/ui/*
- packages/ui/**/*
packages:util:
- packages/util/*
- packages/util/**/*
packages:voice:
- packages/voice/*
- packages/voice/**/*
packages:ws:
- packages/ws/*
- packages/ws/**/*

124
.github/labels.yml vendored Normal file
View File

@@ -0,0 +1,124 @@
- name: api changes
color: '5663e9'
- name: api support
color: '5663e9'
- name: apps:guide
color: fbca04
- name: apps:website
color: fbca04
- name: backlog
color: 7ef7ef
- name: backport
color: 88aabb
- name: blocked
color: fc1423
- name: bug
color: d73a4a
- name: caching
color: 80c042
- name: chore
color: ffffff
- name: ci
color: 0075ca
- name: dependencies
color: 276bd1
- name: discord
color: '5663e9'
- name: discussion
color: b6b1f9
- name: documentation
color: 0075ca
- name: duplicate
color: cfd3d7
- name: error handling
color: 80c042
- name: feature request
color: fcf95a
- name: gateway
color: 80c042
- name: good first issue
color: 7057ff
- name: has PR
color: 4b1f8e
- name: help wanted
color: '008672'
- name: in progress
color: ffccd7
- name: in review
color: aed5fc
- name: interactions
color: 80c042
- name: invalid
color: e4e669
- name: need repro
color: c66037
- name: packages:api-extractor
color: fbca04
- name: packages:api-extractor-model
color: fbca04
- name: packages:brokers
color: fbca04
- name: packages:builders
color: fbca04
- name: packages:collection
color: fbca04
- name: packages:core
color: fbca04
- name: packages:create-discord-bot
color: fbca04
- name: packages:discord.js
color: fbca04
- name: packages:docgen
color: fbca04
- name: packages:formatters
color: fbca04
- name: packages:next
color: fbca04
- name: packages:proxy
color: fbca04
- name: packages:proxy-container
color: fbca04
- name: packages:rest
color: fbca04
- name: packages:ui
color: fbca04
- name: packages:util
color: fbca04
- name: packages:voice
color: fbca04
- name: packages:ws
color: fbca04
- name: performance
color: 80c042
- name: permissions
color: 80c042
- name: priority:high
color: fc1423
- name: question (please use Discord instead)
color: d876e3
- name: ratelimits
color: 80c042
- name: refactor
color: 1d637f
- name: regression
color: ea8785
- name: REST
color: 80c042
- name: semver:major
color: c10f47
- name: semver:minor
color: e4f486
- name: semver:patch
color: e8be8b
- name: sharding
color: 80c042
- name: tests
color: f06dff
- name: threads
color: 80c042
- name: typings
color: 80c042
- name: utility
color: 80c042
- name: wontfix
color: ffffff

6
.github/powered-by-vercel.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
.github/powered-by-workers.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

18
.github/tsc.json vendored Normal file
View File

@@ -0,0 +1,18 @@
{
"problemMatcher": [
{
"owner": "tsc",
"pattern": [
{
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),(\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
]
}
]
}

35
.github/workflows/cleanup-cache.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
name: Cleanup caches
on:
pull_request:
types:
- closed
workflow_dispatch:
jobs:
cleanup:
name: Cleanup caches
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Cleanup caches
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

34
.github/workflows/deploy-website.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Deploy website
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
deploy-website:
name: Deploy website
runs-on: ubuntu-latest
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Pull vercel production environment
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build website artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy website artifacts to vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

50
.github/workflows/deprecate-version.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Deprecate version
on:
workflow_dispatch:
inputs:
package:
description: Package
required: true
type: choice
options:
- '@discordjs/brokers'
- '@discordjs/builders'
- '@discordjs/collection'
- '@discordjs/core'
- 'create-discord-bot'
- '@discordjs/formatters'
- 'discord.js'
- '@discordjs/next'
- '@discordjs/proxy'
- '@discordjs/rest'
- '@discordjs/util'
- '@discordjs/voice'
- '@discordjs/ws'
version:
description: Version(s)
required: true
type: string
message:
description: Deprecation message
required: false
type: string
jobs:
deprecate:
runs-on: ubuntu-latest
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Deprecate
run: pnpm exec npm-deprecate --name "${{inputs.version}}" --message "${{inputs.message || 'This version is deprecated. Please use a newer version.'}}" --package ${{inputs.package}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

232
.github/workflows/documentation.yml vendored Normal file
View File

@@ -0,0 +1,232 @@
name: Documentation
on:
push:
branches:
- 'main'
paths:
- 'packages/*/src/**'
- '!packages/create-discord-bot/**'
- '!packages/proxy-container/**'
- '!packages/ui/**'
tags:
- '**'
workflow_dispatch:
inputs:
ref:
description: 'The branch, tag or SHA to checkout'
required: true
ref_type:
type: choice
description: 'Branch or tag'
options:
- branch
- tag
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build-docs:
name: Build & upload documentation
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
REF_TYPE: ${{ inputs.ref_type || github.ref_type }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref || '' }}
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Build dependencies
run: pnpm run build
- name: Checkout main repository
if: ${{ inputs.ref && inputs.ref != 'main' }}
uses: actions/checkout@v3
with:
path: 'main'
- name: Build main
if: ${{ inputs.ref && inputs.ref != 'main' }}
shell: bash
run: |
cd main
pnpm install --frozen-lockfile --prefer-offline --loglevel error
pnpm run build
cd ..
- name: Extract package and semver from tag
if: ${{ env.REF_TYPE == 'tag' }}
id: extract-tag
uses: ./packages/actions/src/formatTag
with:
tag: ${{ inputs.ref || github.ref_name }}
- name: Apply tag to api-extractor config
if: ${{ env.REF_TYPE == 'tag' && !inputs.ref }}
run: sed -i 's!https://github.com/discordjs/discord.js/tree/main!https://github.com/discordjs/discord.js/tree/${{ steps.extract-tag.outputs.semver }}!' "packages/${{ steps.extract-tag.outputs.package}}/"
- name: Build docs
run: pnpm run docs
- name: Build docs with main api-extractor
if: ${{ inputs.ref && inputs.ref != 'main' }}
run: |
declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "formatters" "next" "proxy" "rest" "util" "voice" "ws")
for PACKAGE in "${PACKAGES[@]}"; do
cd "packages/${PACKAGE}"
sed -i 's!https://github.com/discordjs/discord.js/tree/main!https://github.com/discordjs/discord.js/tree/${{ inputs.ref }}!' api-extractor.json
../../main/packages/api-extractor/bin/api-extractor run --local --minify
../../main/packages/scripts/bin/generateSplitDocumentation.js
cd ../..
done
- name: Checkout docs repository
uses: actions/checkout@v3
with:
repository: 'discordjs/docs'
token: ${{ secrets.DJS_DOCS }}
path: 'out'
- name: Upload documentation to database
if: ${{ env.REF_TYPE == 'tag' && (!inputs.ref || inputs.ref == 'main') }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./packages/actions/src/uploadDocumentation
with:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}
- name: Upload documentation to database
if: ${{ env.REF_TYPE == 'tag' && inputs.ref && inputs.ref != 'main' }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./main/packages/actions/src/uploadDocumentation
with:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}
- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'tag' && (!inputs.ref || inputs.ref == 'main') }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./packages/actions/src/uploadSplitDocumentation
with:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}
- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'tag' && inputs.ref && inputs.ref != 'main' }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./main/packages/actions/src/uploadSplitDocumentation
with:
package: ${{ steps.extract-tag.outputs.package }}
version: ${{ steps.extract-tag.outputs.semver }}
- name: Move docs to correct directory
if: ${{ env.REF_TYPE == 'tag' }}
env:
PACKAGE: ${{ steps.extract-tag.outputs.package }}
SEMVER: ${{ steps.extract-tag.outputs.semver }}
run: |
mkdir -p "out/${PACKAGE}"
if [[ "${PACKAGE}" == "discord.js" ]]; then
mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${SEMVER}.json"
mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${SEMVER}.api.json"
else
mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${SEMVER}.api.json"
fi
- name: Upload documentation to database
if: ${{ env.REF_TYPE == 'branch' && (!inputs.ref || inputs.ref == 'main') }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./packages/actions/src/uploadDocumentation
- name: Upload documentation to database
if: ${{ env.REF_TYPE == 'branch' && inputs.ref && inputs.ref != 'main' }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./main/packages/actions/src/uploadDocumentation
- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'branch' && (!inputs.ref || inputs.ref == 'main') }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./packages/actions/src/uploadSplitDocumentation
- name: Upload split documentation to blob storage
if: ${{ env.REF_TYPE == 'branch' && inputs.ref && inputs.ref != 'main' }}
env:
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
uses: ./main/packages/actions/src/uploadSplitDocumentation
- name: Move docs to correct directory
if: ${{ env.REF_TYPE == 'branch' }}
run: |
declare -a PACKAGES=("brokers" "builders" "collection" "core" "discord.js" "formatters" "next" "proxy" "rest" "util" "voice" "ws")
for PACKAGE in "${PACKAGES[@]}"; do
if [[ "${PACKAGE}" == "discord.js" ]]; then
mkdir -p "out/${PACKAGE}"
mv "packages/${PACKAGE}/docs/docs.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.json"
mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.api.json"
else
mkdir -p "out/${PACKAGE}"
mv "packages/${PACKAGE}/docs/docs.api.json" "out/${PACKAGE}/${GITHUB_REF_NAME}.api.json"
fi
done
- name: Commit and push
run: |
cd out
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit -m "Docs build for ${GITHUB_REF_TYPE} ${GITHUB_REF_NAME}: ${GITHUB_SHA}" || true
git push
build-indices:
needs: build-docs
name: Build & upload search indices
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Build dependencies
run: pnpm run build
- name: Upload search indices to meilisearch
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SEARCH_API_URL: ${{ secrets.SEARCH_API_URL }}
SEARCH_API_KEY: ${{ secrets.SEARCH_API_KEY }}
uses: ./packages/actions/src/uploadSearchIndices

14
.github/workflows/issue-triage.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: 'Issue Labeler'
on:
issues:
types: [opened]
jobs:
issue-triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
configuration-path: .github/issue-labeler.yml
not-before: 2023-01-13T10:25:03.847Z
enable-versioned-regex: 0

23
.github/workflows/label-sync.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Label sync
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/labels.yml'
jobs:
label-sync:
name: Label sync
runs-on: ubuntu-latest
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Label sync
uses: crazy-max/ghaction-github-labeler@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

19
.github/workflows/lock.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Lock Ancient Issues
on:
schedule:
- cron: '0 16 * * *'
workflow_dispatch:
concurrency:
group: lock
jobs:
action:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: dessant/lock-threads@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: 365
issue-lock-reason: resolved
process-only: issues

13
.github/workflows/pr-triage.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: 'PR Triage'
on:
pull_request_target:
jobs:
pr-triage:
name: PR Triage
runs-on: ubuntu-latest
steps:
- name: Automatically label PR
uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true

View File

@@ -0,0 +1,30 @@
name: Publish dev docker images
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
docker-publish:
name: Docker publish
runs-on: ubuntu-latest
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build & push docker image
run: docker build -f packages/proxy-container/Dockerfile -t discordjs/proxy:latest --push .

84
.github/workflows/publish-dev.yml vendored Normal file
View File

@@ -0,0 +1,84 @@
name: Publish dev
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
npm-publish:
name: npm publish
strategy:
fail-fast: false
matrix:
include:
- package: '@discordjs/brokers'
folder: 'brokers'
- package: '@discordjs/builders'
folder: 'builders'
- package: '@discordjs/collection'
folder: 'collection'
- package: '@discordjs/core'
folder: 'core'
- package: '@discordjs/formatters'
folder: 'formatters'
- package: 'discord.js'
folder: 'discord.js'
- package: '@discordjs/next'
folder: 'next'
- package: '@discordjs/proxy'
folder: 'proxy'
- package: '@discordjs/rest'
folder: 'rest'
- package: '@discordjs/util'
folder: 'util'
- package: '@discordjs/voice'
folder: 'voice'
- package: '@discordjs/ws'
folder: 'ws'
runs-on: ubuntu-latest
permissions:
id-token: write
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Check the current development version
id: release-check
run: |
if [[ $(npm view ${{ matrix.package }}@dev version | grep -e "$(git rev-parse --short HEAD)") ]]; \
then echo "RELEASE=0" >> "$GITHUB_OUTPUT"; \
else echo "RELEASE=1" >> "$GITHUB_OUTPUT"; \
fi
- name: Install dependencies
if: steps.release-check.outputs.release == '1'
uses: ./packages/actions/src/pnpmCache
- name: Build dependencies
if: steps.release-check.outputs.release == '1'
run: pnpm run build
- name: Publish package
if: steps.release-check.outputs.release == '1'
run: |
pnpm --filter=${{ matrix.package }} run release --preid "dev.$(date +%s)-$(git rev-parse --short HEAD)"
pnpm --filter=${{ matrix.package }} publish --provenance --no-git-checks --tag dev || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Deprecate prior development releases
if: steps.release-check.outputs.release == '1'
run: pnpm exec npm-deprecate --name "*dev*" --message "This version is deprecated. Please use a newer version." --package ${{ matrix.package }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

27
.github/workflows/publish-docker.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Publish docker images
on:
workflow_dispatch:
jobs:
docker-publish:
name: Docker publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build & push docker image
run: docker build -f packages/proxy-container/Dockerfile -t discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json)) --push .

41
.github/workflows/publish-release.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Publish Release
on:
release:
types: [released]
jobs:
npm-publish:
name: npm publish
runs-on: ubuntu-latest
permissions:
id-token: write
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
if: github.repository_owner == 'discordjs'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Build dependencies
run: pnpm run build
- name: Extract package and semver from tag
id: extract-tag
uses: ./packages/actions/src/formatTag
with:
tag: ${{ github.ref_name }}
- name: Publish package
run: |
pnpm --filter=${{ steps.extract-tag.outputs.subpackage == 'true' && '@discordjs/' || '' }}${{ steps.extract-tag.outputs.package }} publish --provenance --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

64
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Tests
on:
push:
pull_request:
concurrency:
# Group based on workflow name and PR if it exists, if no PR, let it run so carryforward flags work
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
uses: ./packages/actions/src/pnpmCache
- name: Build dependencies (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run build --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4
- name: Build dependencies (Push)
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run build --filter="...[HEAD^1]" --concurrency=4
- name: Tests (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run test --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4
- name: Tests (Push)
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run test --filter="...[HEAD^1]" --concurrency=4
- name: ESLint (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run lint --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4 -- --format=compact
- name: ESLint (Push)
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run lint --filter="...[HEAD^1]" --concurrency=4 -- --format=compact
- name: Docs (PR)
if: ${{ github.event_name != 'push' }}
run: pnpm exec turbo run docs --filter="...[origin/${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || 'main' }}]" --concurrency=4
- name: Docs (Push)
if: ${{ github.event_name == 'push' }}
run: pnpm exec turbo run docs --filter="...[HEAD^1]" --concurrency=4
- name: Upload Coverage
if: github.repository_owner == 'discordjs'
uses: ./packages/actions/src/uploadCoverage

61
.gitignore vendored
View File

@@ -1,21 +1,54 @@
# Packages
node_modules/
yarn.lock
node_modules
# Log files
logs/
logs
*.log
npm-debug.log*
# Authentication
test/auth.json
test/auth.js
docs/deploy/deploy_key
docs/deploy/deploy_key.pub
deploy/deploy_key
deploy/deploy_key.pub
# Runtime data
pids
*.pid
*.seed
# Env
.env
# Dist
dist
dist-docs
# Miscellaneous
.tmp/
.vscode/
docs/docs.json
webpack/
.tmp
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.idea
.DS_Store
.turbo
tsconfig.tsbuildinfo
coverage
out
package.tgz
tsup.config.bundled*
vitest.config.ts.timestamp*
# Deno
deno.lock
# Bun
bun.lockb
# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Cache
.prettiercache
.eslintcache
.vercel

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "typings"]
path = typings
url = https://github.com/zajrik/discord.js-typings

1
.husky/commit-msg Executable file
View File

@@ -0,0 +1 @@
pnpm exec commitlint --edit $1

1
.husky/pre-commit Executable file
View File

@@ -0,0 +1 @@
pnpm run build:affected && pnpm exec lint-staged

6
.lintstagedrc.json Normal file
View File

@@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/lintstagedrc.schema.json",
"*": "prettier --ignore-unknown --write",
"{src/**,__tests__/**}.{mjs,js,cjs,ts,tsx}": "eslint --fix",
"src/**.ts": "vitest related --run --config ../../vitest.config.ts"
}

View File

@@ -1,26 +0,0 @@
# Packages
node_modules/
yarn.lock
# Log files
logs/
*.log
# Authentication
deploy/
# Miscellaneous
.tmp/
.vscode/
docs/
webpack/
# NPM ignore
.eslintrc.json
.gitattributes
.gitignore
.travis.yml
webpack.config.js
.github/
test/

7
.npmrc
View File

@@ -1 +1,6 @@
package-json=false
auto-install-peers=false
resolution-mode=highest
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=*@rushstack/node-core-library*
public-hoist-pattern[]=*jju*

5
.prettierignore Normal file
View File

@@ -0,0 +1,5 @@
CODEOWNERS
CHANGELOG.md
tsup.config.bundled*
vitest.config.ts.timestamp*
pnpm-lock.yaml

9
.prettierrc.json Normal file
View File

@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/prettierrc.json",
"printWidth": 120,
"useTabs": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "all",
"endOfLine": "lf"
}

View File

@@ -1,21 +0,0 @@
{
"ecmaVersion": 7,
"libs": [],
"loadEagerly": [
"./src/*.js"
],
"dontLoad": [
"node_modules/**"
],
"plugins": {
"es_modules": {},
"node": {},
"doc_comment": {
"fullDocs": true,
"strong": true
},
"webpack": {
"configPath": "./webpack.config.js",
}
}
}

View File

@@ -1,20 +0,0 @@
language: node_js
node_js:
- "6"
- "7"
cache:
directories:
- node_modules
install: npm install
script: bash ./deploy/test.sh
jobs:
include:
- stage: build
node_js: "6"
script: bash ./deploy/deploy.sh
env:
global:
- ENCRYPTION_LABEL: "af862fa96d3e"
- COMMIT_AUTHOR_EMAIL: "amishshah.2k@gmail.com"
dist: trusty
sudo: false

13
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"tamasfe.even-better-toml",
"github.vscode-pull-request-github",
"codezombiech.gitignore",
"eamodio.gitlens",
"christian-kohler.npm-intellisense",
"christian-kohler.path-intellisense",
"unifiedjs.vscode-mdx"
]
}

35
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,35 @@
{
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"eslint.experimental.useFlatConfig": true,
"eslint.workingDirectories": [
{ "directory": "${workspaceFolder}" },
{ "pattern": "./apps/*/" },
{ "pattern": "./packages/*/" }
],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "never",
"source.fixAll.eslint": "explicit",
"source.fixAll": "explicit"
},
"editor.trimAutoWhitespace": false,
"files.associations": {
"api-extractor.json": "jsonc",
"api-extractor-docs.json": "jsonc",
"tsconfig.json": "jsonc",
"tsconfig.eslint.json": "jsonc",
"tsconfig.docs.json": "jsonc"
},
"files.insertFinalNewline": true,
"files.eol": "\n",
"npm.packageManager": "pnpm",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"unocss.disable": true,
"deno.enable": false,
"deno.enablePaths": ["./packages/create-discord-bot/template/Deno"],
"deno.lint": false,
"deno.unstable": false,
"deno.config": "./packages/create-discord-bot/template/Deno/deno.jsonc"
}

View File

@@ -175,7 +175,8 @@
END OF TERMS AND CONDITIONS
Copyright 2017 Amish Shah
Copyright 2021 Noel Buechler
Copyright 2015 Amish Shah
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

144
README.md
View File

@@ -1,83 +1,87 @@
<div align="center">
<br />
<p>
<a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
</p>
<br />
<p>
<a href="https://discord.gg/bRCvFy9"><img src="https://discordapp.com/api/guilds/222078108977594368/embed.png" alt="Discord server" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="NPM version" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="NPM downloads" /></a>
<a href="https://travis-ci.org/hydrabolt/discord.js"><img src="https://travis-ci.org/hydrabolt/discord.js.svg" alt="Build status" /></a>
<a href="https://david-dm.org/hydrabolt/discord.js"><img src="https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=3600" alt="Dependencies" /></a>
</p>
<p>
<a href="https://nodei.co/npm/discord.js/"><img src="https://nodei.co/npm/discord.js.png?downloads=true&stars=true" alt="NPM info" /></a>
</p>
<br />
<p>
<a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
</p>
<br />
<p>
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/v/discord.js.svg?maxAge=3600" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/discord.js"><img src="https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600" alt="npm downloads" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Tests status" /></a>
<a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2" alt="Code coverage" /></a>
</p>
<p>
<a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
<a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
</p>
</div>
## About
discord.js is a powerful [node.js](https://nodejs.org) module that allows you to interact with the
[Discord API](https://discordapp.com/developers/docs/intro) very easily.
- Object-oriented
- Predictable abstractions
- Performant
- 100% coverage of the Discord API
This repository contains multiple packages with separate [releases][github-releases]. You can find the assembled Discord API wrapper at [`discord.js`][source]. It is a powerful [Node.js](https://nodejs.org/en) module that allows you to easily interact with the [Discord API](https://discord.com/developers/docs/intro).
## Installation
**Node.js 6.0.0 or newer is required.**
Ignore any warnings about unmet peer dependencies, as they're all optional.
## Packages
Without voice support: `npm install discord.js --save`
With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save`
With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save`
### Audio engines
The preferred audio engine is node-opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose node-opus.
Using opusscript is only recommended for development environments where node-opus is tough to get working.
For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.
### Optional packages
- [bufferutil](https://www.npmjs.com/package/bufferutil) to greatly speed up the WebSocket when *not* using uws (`npm install bufferutil --save`)
- [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack --save`)
- One of the following packages can be installed for faster voice packet encryption and decryption:
- [sodium](https://www.npmjs.com/package/sodium) (`npm install sodium --save`)
- [libsodium.js](https://www.npmjs.com/package/libsodium-wrappers) (`npm install libsodium-wrappers --save`)
- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws --save`)
## Example usage
```js
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log('I am ready!');
});
client.on('message', message => {
if (message.content === 'ping') {
message.reply('pong');
}
});
client.login('your token');
```
- `discord.js` ([source][source]) - A powerful Node.js module for interacting with the Discord API
- `@discordjs/brokers` ([source][brokers-source]) - A collection of brokers for use with discord.js
- `@discordjs/builders` ([source][builders-source]) - A utility package for easily building Discord API payloads
- `@discordjs/collection` ([source][collection-source]) - A powerful utility data structure
- `@discordjs/core` ([source][core-source]) - A thinly abstracted wrapper around the core components of the Discord API
- `@discordjs/formatters` ([source][formatters-source]) - A collection of functions for formatting strings
- `@discordjs/proxy` ([source][proxy-source]) - A wrapper around `@discordjs/rest` for running an HTTP proxy
- `@discordjs/rest` ([source][rest-source]) - A module for interacting with the Discord REST API
- `@discordjs/voice` ([source][voice-source]) - A module for interacting with the Discord Voice API
- `@discordjs/util` ([source][util-source]) - A collection of utility functions
- `@discordjs/ws` ([source][ws-source]) - A wrapper around Discord's gateway
## Links
* [Website](https://discord.js.org/) ([source](https://github.com/hydrabolt/discord.js-site))
* [Documentation](https://discord.js.org/#/docs)
* [Discord.js server](https://discord.gg/bRCvFy9)
* [Discord API server](https://discord.gg/rV4BwdK)
* [GitHub](https://github.com/hydrabolt/discord.js)
* [NPM](https://www.npmjs.com/package/discord.js)
* [Related libraries](https://discordapi.com/unofficial/libs.html) (see also [discord-rpc](https://www.npmjs.com/package/discord-rpc))
- [Website][website] ([source][website-source])
- [Documentation][documentation]
- [Guide][guide] ([source][guide-source])
Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
- [discord.js Discord server][discord]
- [Discord API Discord server][discord-api]
- [GitHub][source]
- [npm][npm]
- [Related libraries][related-libs]
### Extensions
- [RPC][rpc] ([source][rpc-source])
## Contributing
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
[documentation](https://discord.js.org/#/docs).
See [the contribution guide](https://github.com/hydrabolt/discord.js/blob/master/.github/CONTRIBUTING.md) if you'd like to submit a PR.
Please read through our [contribution guidelines][contributing] before starting a pull request. We welcome contributions of all kinds, not just code! If you're stuck for ideas, look for the [good first issue][good-first-issue] label on issues in the repository. If you have any questions about the project, feel free to ask them on [Discord][discord]. Before creating your own issue or pull request, always check to see if one already exists! Don't rush contributions, take your time and ensure you're doing it correctly.
## Help
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle
nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please join our [Discord server][discord].
[website]: https://discord.js.org
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[documentation]: https://discord.js.org/docs
[guide]: https://discordjs.guide/
[guide-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs
[discord-api]: https://discord.gg/discord-api
[source]: https://github.com/discordjs/discord.js/tree/main/packages/discord.js
[npm]: https://www.npmjs.com/package/discord.js
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
[rpc]: https://www.npmjs.com/package/discord-rpc
[rpc-source]: https://github.com/discordjs/RPC
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
[github-releases]: https://github.com/discordjs/discord.js/releases
[brokers-source]: https://github.com/discordjs/discord.js/tree/main/packages/brokers
[builders-source]: https://github.com/discordjs/discord.js/tree/main/packages/builders
[collection-source]: https://github.com/discordjs/discord.js/tree/main/packages/collection
[core-source]: https://github.com/discordjs/discord.js/tree/main/packages/core
[formatters-source]: https://github.com/discordjs/discord.js/tree/main/packages/formatters
[proxy-source]: https://github.com/discordjs/discord.js/tree/main/packages/proxy
[rest-source]: https://github.com/discordjs/discord.js/tree/main/packages/rest
[voice-source]: https://github.com/discordjs/discord.js/tree/main/packages/voice
[util-source]: https://github.com/discordjs/discord.js/tree/main/packages/util
[ws-source]: https://github.com/discordjs/discord.js/tree/main/packages/ws
[good-first-issue]: https://github.com/discordjs/discord.js/contribute

425
api-extractor.json Normal file
View File

@@ -0,0 +1,425 @@
/**
* Config file for API Extractor. For more info, please visit: https://api-extractor.com
*/
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
/**
* Optionally specifies another JSON config file that this file extends from. This provides a way for
* standard settings to be shared across multiple projects.
*
* If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains
* the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be
* resolved using NodeJS require().
*
* SUPPORTED TOKENS: none
* DEFAULT VALUE: ""
*/
// "extends": "./shared/api-extractor-base.json"
// "extends": "my-package/include/api-extractor-base.json"
/**
* Determines the "<projectFolder>" token that can be used with other config file settings. The project folder
* typically contains the tsconfig.json and package.json config files, but the path is user-defined.
*
* The path is resolved relative to the folder of the config file that contains the setting.
*
* The default value for "projectFolder" is the token "<lookup>", which means the folder is determined by traversing
* parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder
* that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error
* will be reported.
*
* SUPPORTED TOKENS: <lookup>
* DEFAULT VALUE: "<lookup>"
*/
// "projectFolder": "..",
/**
* (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor
* analyzes the symbols exported by this module.
*
* The file extension must be ".d.ts" and not ".ts".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
*/
"mainEntryPointFilePath": "<projectFolder>/dist-docs/index.d.ts",
/**
* A list of NPM package names whose exports should be treated as part of this package.
*
* For example, suppose that Webpack is used to generate a distributed bundle for the project "library1",
* and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part
* of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly
* imports library2. To avoid this, we can specify:
*
* "bundledPackages": [ "library2" ],
*
* This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been
* local files for library1.
*/
"bundledPackages": [],
/**
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
*/
"compiler": {
/**
* Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* Note: This setting will be ignored if "overrideTsconfig" is used.
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/tsconfig.json"
*/
// "tsconfigFilePath": "<projectFolder>/tsconfig.json",
/**
* Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk.
* The object must conform to the TypeScript tsconfig schema:
*
* http://json.schemastore.org/tsconfig
*
* If omitted, then the tsconfig.json file will be read from the "projectFolder".
*
* DEFAULT VALUE: no overrideTsconfig section
*/
"overrideTsconfig": {
"compilerOptions": {
// Type Checking
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": false,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
// Modules
"allowArbitraryExtensions": false,
"allowImportingTsExtensions": false,
"module": "ESNext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"resolvePackageJsonExports": false,
"resolvePackageJsonImports": false,
// Emit
"declaration": true,
"declarationMap": true,
"importHelpers": false,
"newLine": "lf",
"noEmitHelpers": true,
"outDir": "dist",
"removeComments": false,
"sourceMap": true,
// Interop Constraints
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
// Language and Environment
"experimentalDecorators": true,
"lib": ["ESNext"],
"target": "ES2022",
"useDefineForClassFields": true
}
}
/**
* This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended
* and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when
* dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses
* for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck.
*
* DEFAULT VALUE: false
*/
// "skipLibCheck": true,
},
/**
* Configures how the API report file (*.api.md) will be generated.
*/
"apiReport": {
/**
* (REQUIRED) Whether to generate an API report.
*/
"enabled": false
/**
* The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce
* a full file path.
*
* The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/".
*
* SUPPORTED TOKENS: <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<unscopedPackageName>.api.md"
*/
// "reportFileName": "<unscopedPackageName>.api.md",
/**
* Specifies the folder where the API report file is written. The file name portion is determined by
* the "reportFileName" setting.
*
* The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy,
* e.g. for an API review.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/temp/"
*/
// "reportFolder": "<projectFolder>/temp/",
/**
* Specifies the folder where the temporary report file is written. The file name portion is determined by
* the "reportFileName" setting.
*
* After the temporary file is written to disk, it is compared with the file in the "reportFolder".
* If they are different, a production build will fail.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/temp/"
*/
// "reportTempFolder": "<projectFolder>/temp/"
},
/**
* Configures how the doc model file (*.api.json) will be generated.
*/
"docModel": {
/**
* (REQUIRED) Whether to generate a doc model file.
*/
"enabled": true,
/**
* The output path for the doc model file. The file extension should be ".api.json".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/temp/<unscopedPackageName>.api.json"
*/
"apiJsonFilePath": "<projectFolder>/docs/docs.api.json"
},
/**
* Configures how the .d.ts rollup file will be generated.
*/
"dtsRollup": {
/**
* (REQUIRED) Whether to generate the .d.ts rollup file.
*/
"enabled": false,
/**
* Specifies the output path for a .d.ts rollup file to be generated without any trimming.
* This file will include all declarations that are exported by the main entry point.
*
* If the path is an empty string, then this file will not be written.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<projectFolder>/dist/<unscopedPackageName>.d.ts"
*/
"untrimmedFilePath": "<projectFolder>/dist-docs/index.d.ts"
/**
* Specifies the output path for a .d.ts rollup file to be generated with trimming for an "alpha" release.
* This file will include only declarations that are marked as "@public", "@beta", or "@alpha".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: ""
*/
// "alphaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-alpha.d.ts",
/**
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release.
* This file will include only declarations that are marked as "@public" or "@beta".
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: ""
*/
// "betaTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-beta.d.ts",
/**
* Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release.
* This file will include only declarations that are marked as "@public".
*
* If the path is an empty string, then this file will not be written.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: ""
*/
// "publicTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-public.d.ts",
/**
* When a declaration is trimmed, by default it will be replaced by a code comment such as
* "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the
* declaration completely.
*
* DEFAULT VALUE: false
*/
// "omitTrimmingComments": true
},
/**
* Configures how the tsdoc-metadata.json file will be generated.
*/
"tsdocMetadata": {
/**
* Whether to generate the tsdoc-metadata.json file.
*
* DEFAULT VALUE: true
*/
// "enabled": true,
/**
* Specifies where the TSDoc metadata file should be written.
*
* The path is resolved relative to the folder of the config file that contains the setting; to change this,
* prepend a folder token such as "<projectFolder>".
*
* The default value is "<lookup>", which causes the path to be automatically inferred from the "tsdocMetadata",
* "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup
* falls back to "tsdoc-metadata.json" in the package folder.
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
* DEFAULT VALUE: "<lookup>"
*/
// "tsdocMetadataFilePath": "<projectFolder>/dist/tsdoc-metadata.json"
},
/**
* Specifies what type of newlines API Extractor should use when writing output files. By default, the output files
* will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead.
* To use the OS's default newline kind, specify "os".
*
* DEFAULT VALUE: "crlf"
*/
"newlineKind": "lf",
/**
* Configures how API Extractor reports error and warning messages produced during analysis.
*
* There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages.
*/
"messages": {
/**
* Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing
* the input .d.ts files.
*
* TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551"
*
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
*/
"compilerMessageReporting": {
/**
* Configures the default routing for messages that don't match an explicit rule in this table.
*/
"default": {
/**
* Specifies whether the message should be written to the the tool's output log. Note that
* the "addToApiReportFile" property may supersede this option.
*
* Possible values: "error", "warning", "none"
*
* Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail
* and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes
* the "--local" option), the warning is displayed but the build will not fail.
*
* DEFAULT VALUE: "warning"
*/
"logLevel": "warning"
/**
* When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md),
* then the message will be written inside that file; otherwise, the message is instead logged according to
* the "logLevel" option.
*
* DEFAULT VALUE: false
*/
// "addToApiReportFile": false
}
// "TS2551": {
// "logLevel": "warning",
// "addToApiReportFile": true
// },
//
// . . .
},
/**
* Configures handling of messages reported by API Extractor during its analysis.
*
* API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag"
*
* DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings
*/
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
// "addToApiReportFile": false
},
// Disable the following warning:
// (ae-missing-release-tag) "x" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
"ae-missing-release-tag": {
"logLevel": "none"
}
// "ae-extra-release-tag": {
// "logLevel": "warning",
// "addToApiReportFile": true
// },
//
// . . .
},
/**
* Configures handling of messages reported by the TSDoc parser when analyzing code comments.
*
* TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text"
*
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
*/
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
// "addToApiReportFile": false
}
// "tsdoc-link-tag-unescaped-text": {
// "logLevel": "warning",
// "addToApiReportFile": true
// },
//
// . . .
}
}
}

View File

@@ -0,0 +1 @@
METADATA_BASE_URL=http://localhost:3000

28
apps/guide/.gitignore vendored Normal file
View File

@@ -0,0 +1,28 @@
# Packages
node_modules
# Log files
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Env
.env
.env*.local
# Dist
.contentlayer
.next
public/searchIndex
src/styles/unocss.css
# Miscellaneous
.tmp
.vscode
lighthouse-results

View File

@@ -0,0 +1,2 @@
/** @type {import('lint-staged').Config} */
module.exports = require('../../.lintstagedrc.json');

View File

@@ -0,0 +1,7 @@
.contentlayer
.next
.turbo
.vscode
coverage
src/styles/unocss.css
next-env.d.ts

View File

@@ -0,0 +1,2 @@
/** @type {import('prettier').Config} */
module.exports = require('../../.prettierrc.json');

52
apps/guide/README.md Normal file
View File

@@ -0,0 +1,52 @@
<div align="center">
<br />
<p>
<a href="https://discord.js.org"><img src="https://discord.js.org/static/logo.svg" width="546" alt="discord.js" /></a>
</p>
<br />
<p>
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
</p>
<p>
<a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
<a href="https://www.cloudflare.com"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-workers.png" alt="Cloudflare Workers" height="44" /></a>
</p>
</div>
## About
The official guide for discord.js, made to help you get started easily with the library.
## Links
- [Website][website] ([source][website-source])
- [Documentation][documentation]
- [Guide][guide] ([source][guide-source])
Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
- [discord.js Discord server][discord]
- [Discord API Discord server][discord-api]
- [GitHub][source]
- [Related libraries][related-libs]
## Contributing
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
[documentation][documentation].
See [the contribution guide][contributing] if you'd like to submit a PR.
## Help
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
[website]: https://discord.js.org
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
[documentation]: https://discord.js.org/docs
[guide]: https://discordjs.guide/
[guide-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs
[discord-api]: https://discord.gg/discord-api
[source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md

View File

@@ -0,0 +1,94 @@
import { remarkCodeHike } from '@code-hike/mdx';
import { defineDocumentType, makeSource } from 'contentlayer/source-files';
import { type Node, toString } from 'hast-util-to-string';
import { h } from 'hastscript';
import { escape } from 'html-escaper';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import remarkGfm from 'remark-gfm';
import codeHikeThemeDarkPlus from './src/styles/code-hike-theme-dark-plus.json';
export const Content = defineDocumentType(() => ({
name: 'Content',
filePathPattern: `**/*.mdx`,
contentType: 'mdx',
fields: {
title: {
type: 'string',
required: true,
},
category: {
type: 'string',
required: true,
},
},
computedFields: {
slug: {
type: 'string',
// eslint-disable-next-line unicorn/prefer-string-replace-all
resolve: (doc) => doc._raw.flattenedPath.replace(/\d+-/g, ''),
},
url: {
type: 'string',
// eslint-disable-next-line unicorn/prefer-string-replace-all
resolve: (doc) => `/guide/${doc._raw.flattenedPath.replace(/\d+-/g, '')}`,
},
},
}));
const LinkIcon = h(
'svg',
{
width: '1.25rem',
height: '1.25rem',
viewBox: '0 0 24 24',
fill: 'none',
stroke: 'currentColor',
strokeWidth: '2',
strokeLinecap: 'round',
strokeLinejoin: 'round',
},
h('path', {
// eslint-disable-next-line id-length
d: 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71',
}),
h('path', {
// eslint-disable-next-line id-length
d: 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71',
}),
);
const createSROnlyLabel = (text: any) => {
return h('span', { class: 'sr-only' }, `Section titled ${escape(text)}`);
};
export default makeSource({
contentDirPath: 'src/content',
documentTypes: [Content],
mdx: {
remarkPlugins: [remarkGfm, [remarkCodeHike, { theme: codeHikeThemeDarkPlus, lineNumbers: true }]],
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
properties: {
class:
'relative inline-flex place-items-center place-content-center outline-none text-black dark:text-white pr-2 -ml-8 opacity-0 group-hover:opacity-100',
},
behavior: 'prepend',
content: (heading: Node) => [
h(
`span.anchor-icon`,
{
ariaHidden: 'true',
},
LinkIcon,
),
createSROnlyLabel(toString(heading)),
],
},
],
],
},
});

5
apps/guide/next-env.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

25
apps/guide/next.config.js Normal file
View File

@@ -0,0 +1,25 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
// import bundleAnalyzer from '@next/bundle-analyzer';
// import { withContentlayer } from 'next-contentlayer';
const bundleAnalyzer = require('@next/bundle-analyzer');
const { withContentlayer } = require('next-contentlayer');
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
module.exports = withBundleAnalyzer(
withContentlayer({
reactStrictMode: true,
experimental: {
typedRoutes: true,
},
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
},
poweredByHeader: false,
}),
);

100
apps/guide/package.json Normal file
View File

@@ -0,0 +1,100 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@discordjs/guide",
"version": "0.1.0",
"description": "Imagine a guide... that explores the many possibilities for your discord.js bot",
"private": true,
"scripts": {
"test": "vitest run",
"build:check": "tsc --noEmit",
"build:local": "pnpm run build:prod",
"build:prod": "next build",
"build:analyze": "cross-env ANALYZE=true pnpm run build:prod",
"preview": "next start",
"dev": "next dev",
"generate:contentlayer": "contentlayer build",
"lint": "pnpm run build:check && prettier --check . && cross-env TIMING=1 eslint --format=pretty src",
"format": "pnpm run build:check && prettier --write . && cross-env TIMING=1 eslint --fix --format=pretty src",
"fmt": "pnpm run format"
},
"type": "commonjs",
"directories": {
"lib": "src"
},
"contributors": [
"Crawl <icrawltogo@gmail.com>"
],
"license": "Apache-2.0",
"keywords": [
"discord",
"api",
"bot",
"client",
"node",
"discordapp",
"discordjs"
],
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord.js.git",
"directory": "apps/guide"
},
"bugs": {
"url": "https://github.com/discordjs/discord.js/issues"
},
"homepage": "https://discord.js.org",
"funding": "https://github.com/discordjs/discord.js?sponsor",
"dependencies": {
"@code-hike/mdx": "^0.9.0",
"@discordjs/ui": "workspace:^",
"@react-icons/all-files": "^4.1.0",
"@vercel/analytics": "^1.2.2",
"@vercel/edge-config": "^1.1.0",
"@vercel/og": "^0.6.2",
"ariakit": "2.0.0-next.44",
"cmdk": "^1.0.0",
"contentlayer": "^0.3.4",
"next": "14.2.1",
"next-contentlayer": "^0.3.4",
"next-themes": "^0.3.0",
"react": "^18.2.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "^18.2.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"sharp": "^0.33.3"
},
"devDependencies": {
"@next/bundle-analyzer": "14.2.1",
"@testing-library/react": "^15.0.2",
"@testing-library/user-event": "^14.5.2",
"@types/html-escaper": "^3.0.2",
"@types/node": "18.18.8",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@unocss/eslint-plugin": "^0.59.3",
"@unocss/postcss": "^0.58.5",
"@unocss/reset": "^0.59.3",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^1.5.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.62",
"eslint-formatter-pretty": "^6.0.1",
"happy-dom": "^14.7.1",
"hast-util-to-string": "^2.0.0",
"hastscript": "^8.0.0",
"html-escaper": "^3.0.3",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"turbo": "^1.13.2",
"typescript": "^5.4.5",
"unocss": "^0.59.3",
"vercel": "^34.0.0",
"vitest": "^1.5.0"
},
"engines": {
"node": ">=18"
}
}

View File

@@ -0,0 +1,5 @@
module.exports = {
plugins: {
'@unocss/postcss': {},
},
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/mstile-70x70.png"/>
<square150x150logo src="/mstile-150x150.png"/>
<square310x310logo src="/mstile-310x310.png"/>
<wide310x150logo src="/mstile-310x150.png"/>
<TileColor>#090a16</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="400.000000pt" height="400.000000pt" viewBox="0 0 400.000000 400.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,400.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M0 2000 l0 -2000 2000 0 2000 0 0 2000 0 2000 -2000 0 -2000 0 0
-2000z m1305 795 c219 -47 373 -197 421 -411 24 -109 16 -315 -16 -399 l-23
-61 -59 -11 c-110 -21 -182 -92 -203 -202 -11 -56 -11 -56 -68 -79 -76 -30
-201 -42 -464 -42 l-223 0 0 610 0 610 283 0 c210 0 300 -4 352 -15z m890
-585 c0 -543 -2 -601 -18 -659 -56 -198 -190 -334 -365 -370 -176 -37 -349 5
-471 115 -48 44 -111 134 -111 161 0 6 19 14 43 18 23 4 73 18 110 32 l68 24
50 -45 c56 -50 98 -66 175 -66 100 0 207 81 234 178 6 23 10 251 10 625 l0
588 138 -3 137 -3 0 -595z m930 570 c93 -29 197 -84 252 -134 l44 -41 -61 -75
c-34 -41 -67 -81 -74 -88 -10 -10 -25 -4 -78 32 -95 63 -154 81 -268 81 -79 0
-103 -4 -142 -23 -62 -31 -90 -71 -96 -137 -8 -94 28 -137 168 -202 157 -73
172 -80 240 -108 236 -97 341 -215 356 -400 16 -193 -82 -363 -258 -449 -91
-45 -187 -66 -303 -66 -191 0 -390 74 -524 195 l-40 37 80 93 80 94 73 -53
c168 -121 353 -155 491 -92 72 33 108 82 113 155 9 122 -37 162 -323 286 -258
111 -350 179 -407 300 -69 148 -37 343 75 463 61 65 195 133 300 152 79 14
222 4 302 -20z m-1367 -977 c45 -34 65 -69 70 -125 4 -61 -19 -106 -77 -145
-90 -60 -226 3 -238 111 -3 24 -3 56 1 70 8 34 54 86 91 102 40 19 120 12 153
-13z"/>
<path d="M967 2543 c-4 -3 -7 -159 -7 -346 l0 -339 128 4 c101 3 136 8 172 24
106 48 162 145 168 292 10 214 -69 334 -238 361 -73 12 -213 15 -223 4z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,19 @@
{
"name": "discord.js guide",
"short_name": "discord.js guide",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
}
],
"theme_color": "#1a1b1e",
"background_color": "#1a1b1e",
"display": "standalone"
}

Some files were not shown because too many files have changed in this diff Show More