Commit Graph

3211 Commits

Author SHA1 Message Date
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
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
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
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
SpaceEEC
83bc6e0779 fix(Guild): update premiumSinceTimestamp on guild member update 2020-02-07 19:13:02 +01:00
Souji
364914fd35 fix(GuildMember): manageable - let owner override (#3766)
This backports #3765
2020-02-07 18:27:56 +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
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
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
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
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