Commit Graph

4869 Commits

Author SHA1 Message Date
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 12.1.1 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 12.1.0 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 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