Commit Graph

3189 Commits

Author SHA1 Message Date
SpaceEEC
903f6ca75f fix: only setMaxListeners when max listeners is not 0 (#3716) 2020-01-24 16:41:37 +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
SpaceEEC
464ef25898 fix(ClientDataResolver): return a user in resolveUser when passing guild (#3719) 2020-01-20 22:02:28 +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
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
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
SpaceEEC
36c0496ea5 fix(Guild): assign GuildMember#selfStream, if present, when adding a member 2020-01-13 21:43:42 +01: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
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
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
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
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
λtlas
1d6606293a docs(Client): clarify whose ToS are being violated (#3580) 2019-11-19 21:50:45 +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
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
Souji
2a78b00454 fix(typings): GuildChannel#parent and #parentID are nullable (#3509) 2019-10-02 14:26:53 +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
Vlad Frangu
748555036d typings: Add missing rateLimitPerUser property (#3480) 2019-09-22 17:07:44 +02:00
Vlad Frangu
43c0a794e1 fix(GuildAuditLogsEntry): default to object with id for deleted targets (#3373) 2019-08-28 11:22:25 +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
SpaceEEC
1121b2f7bf fix(GuildChannel): return GuildChannel in setPosition instead of Guild
fixes #3413
2019-07-30 17:46:22 +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
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
6f49aadf4f fix(Guild): allow fetchMember to be used with an uncached user (#3333) 2019-06-08 10:39:03 +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
Amish Shah
5dd9181497 v11.5.1 11.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
bdistin
8c213e9088 fix(Message#pinnable): you can't pin system messages (#3279) 2019-05-18 19:06:15 +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
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
SpaceEEC
c844a7b4e2 docs(Guild): fix typo in example of createChannel 2019-05-14 20:12:57 +02:00
Schuyler Cebulskie
e82633fb00 Bump version to 11.5.0 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