Commit Graph

5239 Commits

Author SHA1 Message Date
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 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 12.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 12.0.0 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 11.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 11.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