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
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
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
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
Amish Shah
841b9de918
voice: mark speaking as false when paused, prevent repeated pausing
2018-05-09 14:33:23 +01: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
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
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
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
Lewdcario
745669a7c9
docs: consistency
2018-04-29 13:28:12 -05: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
Amish Shah
299fc001d5
voice: start using provided IP rather than manually resolving
2018-04-27 15:11:37 +01: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
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
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
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
Frangu Vlad
61ad9475de
fix(ClientManager): patch ClientUser's presence with ClientOption's one ( #2458 )
2018-04-13 08:27:53 +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
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
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
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
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
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
9b41a6a8a6
fix: re-add highest property to RoleStore and GuildMemberRoleStore
...
closes #2302
2018-03-01 11:52:29 -06: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
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
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
Kyra
a8172951d3
perf(Collection): Performance improvements ( #2342 )
...
* Update Collection.js
* ESLint
2018-02-16 10:19:30 +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
Isabella
66c0512de2
feat(ShardClientUtil#broadcastEval): allow promise resolve ( #2328 )
2018-02-07 11:07:59 -05: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
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
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
Dim
10f98d8e57
use String#padStart for Role#hexColor ( #2294 )
2018-01-27 07:42:49 +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
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
07c48a6845
fix: require discordjserror to throw meaningful errors where necessary
2018-01-22 20:23:36 +01: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
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
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
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
Schuyler Cebulskie
f649610c26
Merge branch 'master' into voice-rewrite
2018-01-18 19:49:23 -05: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
Amish Shah
b94d60d2ab
Merge branch 'master' into voice-rewrite
2018-01-16 17:24:07 +00: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
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
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
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
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
f4ac06024e
Improve ColorResolvable docs
2017-11-18 23:34:34 -05:00
Schuyler Cebulskie
b859501b6f
Document and clean up some garbage
2017-11-18 20:30:13 -05:00
Schuyler Cebulskie
b7c4df5dc1
Fix trailing space
2017-11-18 17:19:34 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
É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
Gus Caplan
a2520efa1a
Use node 8 error code ( #1557 )
2017-06-01 21:14:42 +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
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
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
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
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
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
SpaceEEC
e6437388cf
Endpoints.Guild(...).Emoji(...) should not use CDN ( #1462 )
2017-05-05 02:22:55 +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
Gus Caplan
3bab4ec9fd
Add time methods to Audit Log entries ( #1443 )
...
* aaaaa
* Update GuildAuditLogs.js
2017-05-01 18:05:15 +01:00
aemino
2bf8a36077
Allow await endpoint stage to not error ( #1444 )
2017-05-01 18:01:28 +01:00
Amish Shah
c48f042785
silly hydar
2017-05-01 15:42:47 +01:00
Amish Shah
b8018d4b6d
Reconnect on 1000 if client didn't close
2017-05-01 15:32:40 +01:00
Amish Shah
6e4b744d03
Export ClientOAuth2Application
2017-05-01 15:27:44 +01:00
Amish Shah
135d9e3ea0
Expose GuildAuditLogs
2017-05-01 15:25:21 +01:00
Amish Shah
51a2e465bd
Let client know who closed the WebSocket
2017-05-01 15:24:02 +01:00
Amish Shah
2ace21c412
backwards compat docs
2017-05-01 15:10:11 +01:00
Amish Shah
140839128a
Fix ban delete days
2017-05-01 15:07:02 +01:00
Amish Shah
0f4983852e
Fix ban message delete days
2017-05-01 14:57:27 +01:00
Amish Shah
db45d99d0c
More deprecated stuff
2017-05-01 11:28:48 +01:00
Amish Shah
8bab9fb122
Add VIEW_AUDIT_LOG to Permissions docs
2017-05-01 11:15:09 +01:00
Isabella
a02e10926d
Stop using deprecated methods within discord.js ( #1441 )
...
* fix deprecation stuff
* fixed a check
2017-05-01 10:14:26 +01:00
Drahcirius
166161d6d3
ready event will now throw errors properly ( #1440 )
2017-05-01 08:43:35 +01:00
Amish Shah
892ba67d71
Emit packet handling errors to the error event and not the debug event
2017-05-01 07:56:13 +01:00
Crawl
c3be798663
Update GuildAuditLogs.js
2017-05-01 01:03:12 +02:00
Gus Caplan
7779069e32
add audit logs "extras" ( #1435 )
...
* add audit logs "extras"
* whoops
* Update GuildAuditLogs.js
2017-04-30 23:57:42 +01:00
Gus Caplan
1ddae43fed
Add class doc blocks to Audit Logs ( #1438 )
2017-04-30 23:57:06 +01:00
SpaceEEC
c5efa985fc
Readding Client#disconnect and docs for Client#reconnecting ( #1437 )
...
* readded docs for client#reconnecting and client#disconnect
* moved disconnect event emitting and clarified emitting reason
2017-05-01 00:16:02 +02:00
Amish Shah
0754ddbc34
Reset sequence when sessions are invalidated
2017-04-30 22:26:44 +01:00
Gus Caplan
37b1f38ebe
Make audit log entries a collection ( #1436 )
2017-04-30 21:25:22 +01:00
Amish Shah
c2566d230c
Wait undo that
2017-04-30 21:04:39 +01:00
Amish Shah
474a954938
Force deaf/mute properties to be booleans even when null data is received
2017-04-30 21:04:11 +01:00
Amish Shah
e460e5e853
Fix some stuff
2017-04-30 21:01:04 +01:00
Crawl
457b9600f2
Docs consistency plz
2017-04-30 13:16:19 +02:00
Crawl
3cb4aac65a
Remove unused util
2017-04-30 13:03:51 +02:00
Amish Shah
edf1a3e7b4
Undeprecate uws and fix support for it
2017-04-30 11:56:24 +01:00
Amish Shah
f20f49388d
Simplify data unpack logic
2017-04-30 11:40:16 +01:00
Amish Shah
007b1226c9
Rudimentary support for uws while it is deprecated
2017-04-30 11:36:20 +01:00
Amish Shah
8e5c600227
Make OAuth2Application backwards compatible again
2017-04-30 11:21:48 +01:00
Amish Shah
dd110f4824
Add example for creating VoiceBroadcasts
2017-04-30 11:04:41 +01:00
Amish Shah
81b176cfea
BaseOpusEngine should be private
2017-04-30 11:01:26 +01:00
aemino
5cad25ea69
Add Guild#me ( #1384 )
...
* Add Guild#me
(also did minor docs cleanup)
* Don't use Guild#member as there's nothing to resolve
* Update ClientDataResolver.js
* Update Guild.js
* Update Guild.js
* Update Guild.js
2017-04-30 04:30:59 -04:00
Pg Biel
9a5de25d79
Emoji convenience methods ( #1378 )
...
* make branch
* stuff
* Consistency & remove role(s)
* kill me
* Doc changes
Requested by Crawl
* forgot 1
2017-04-30 04:51:15 +02:00
Crawl
ac92d2cecc
Improve docs a bit
2017-04-30 04:30:44 +02:00
Schuyler Cebulskie
3f8c0a4d11
Move things
2017-04-29 20:56:40 -04:00
Schuyler Cebulskie
e2c8ba5be0
Allow MessageMentions#channels to function in DMs
2017-04-29 20:18:23 -04:00
Schuyler Cebulskie
aa35e21b84
Revert "Make MessageMentions#channels return an empty collection in DMs ( #1430 )"
...
This reverts commit 88aa947376 .
2017-04-29 20:00:36 -04:00
Gus Caplan
6f96cf7325
Use Target variables for consistency ( #1431 )
2017-04-30 00:36:26 +01:00
Amish Shah
ee37d859a4
dumb ass bug fix
2017-04-29 22:47:06 +01:00
Amish Shah
1a69331f0c
Merge branch 'master' of https://github.com/hydrabolt/discord.js
2017-04-29 21:09:56 +01:00
Amish Shah
c40252381b
Deprecate all the things
2017-04-29 21:09:53 +01:00
Gus Caplan
4127cf6e40
Experimental support for Audit Logs ( #1403 )
...
* start audit logs
* make better var types so gawdl3y doesn't shit on this
* add constructor stuff
* make more changes
* add entry creation
* add methods
* make it all work hopefully
* aaa
* aaaa
* i wish i could test this locally
* fix users, guild when i feel like it
* make guild prop non-enumerable
* make better types
* change nouns
* e
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* eek
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* friggin trailing spaces
* Update GuildAuditLogs.js
* docs!
* Update GuildAuditLogs.js
* reason stuff
* Update GuildAuditLogs.js
* Update GuildAuditLogs.js
* support before/after for pagination
* Update Guild.js
* Update GuildAuditLogs.js
* mfw using github web editor
* fix build
* Update Guild.js
* amazing cache fuckery shit evil
* cool stuff
* make building audit logs nicer
* ban endpoint stuff
* dox
* <.<
2017-04-29 20:34:57 +01:00
Amish Shah
b0a3528411
sorry gus i borked
2017-04-29 20:00:05 +01:00
Amish Shah
5b2ca326d4
ESLint pls >.>
2017-04-29 18:07:48 +01:00
Amish Shah
f7d65991d5
Minor refactor of Actions
2017-04-29 17:56:36 +01:00
Amish Shah
dd8f77fcf0
Stop the EventEmitter debug warnings when fetching lots of guilds before ready
2017-04-29 17:46:36 +01:00
Amish Shah
584961b04b
Debug resume from connection not Client
2017-04-29 15:58:12 +01:00
Amish Shah
2e33bf583e
Try to fix StreamDispatchers ( #1387 )
2017-04-29 15:12:34 +01:00
SpaceEEC
88aa947376
Make MessageMentions#channels return an empty collection in DMs ( #1430 )
...
* Make MessageMentions#channels return an empty collection in DMs
* reduce code duplication and corrected docstring
2017-04-29 14:33:18 +01:00
stupid cat
d6b7d31047
Better ClientUser#setStatus for self bots ( #1428 )
...
* better setstatus for selfbots
* make both calls
* must return
* use setpresence, set invisible
2017-04-29 14:31:32 +01:00
Will Nelson
13672cc637
Export ReactionCollector and Collector ( #1426 )
2017-04-29 14:27:39 +01:00
SpaceEEC
956372731f
Using ws.connection.status rather than undefined ws.status ( #1429 )
2017-04-28 21:27:30 +02:00
Drahcirius
9ee695a291
incorrect variable name convention ( #1427 )
...
I'm not pr farming, I swear.
Gus told me to fix it.
2017-04-28 19:46:24 +02:00
Will Nelson
35c4c552f4
[wip] Fix collector documentation (again) ( #1416 )
...
* remove private on abstract methods, fix timeout type
* make client readonly, add documentation to abstract methods
* document implemented collector methods
2017-04-28 19:45:46 +02:00
Drahcirius
89745fe132
emojis should use cdn endpoint ( #1425 )
2017-04-28 18:47:18 +02:00
Drahcirius
2accb7b6fd
small typo fix in emoji id endpoint ( #1424 )
2017-04-28 18:11:12 +02:00
Amish Shah
195fcfa15c
Rewrite WebSocket internals ( #1410 )
...
* Start rewriting Manager and Connection
* more stuff
* stuff
* Fix ready bug
* some stuff i forgot
* fix some stuff
* add stupid heartbeat ack like seriously who cares
* woo!
* fix a bug
* rate limit the dumb websocket
* stuff
* hdocs
* Docs
* Remove ClientManager#setupKeepAlive as it is now redundant
* Change Client._pingTimestamp to a getter that fetches the timestamp from the WebSocketConnection
* are you happy now eslint smh
* make gus happy
* Add CloseEvent external doc
* Make sure to emit 'reconnecting' when actually reconnecting
* ffs
* Fix RESUME logic
* Add heartbeat ack debug messages, including latency data
* Dumb stuff for Gus
* thx eslint
* more dumb stuff
* more dumb crap smh gus i h8 u
* moar messages
* fix for using wrong status, causing certain events not to be fired (#1422 )
2017-04-28 16:13:06 +01:00
SpaceEEC
95bcac9d9b
Throwing 'Message not found' error when fetching from empty channel or without read history permission. ( #1394 )
2017-04-28 17:02:52 +02:00
Gus Caplan
1601ad14e3
i hate my life ( #1420 )
2017-04-27 00:21:03 +02:00
Gus Caplan
5ac22691d2
Add TextBasedChannel#nsfw (excluding User and GuildMember) ( #1419 )
2017-04-26 23:01:27 +01:00
bdistin
298ee4e79f
Throw an error if you try to initiate a new SnowflakeUtil class instance ( #1413 )
2017-04-25 23:29:30 +02:00
SpaceEEC
909b825c94
Fixed acknowledging of channels ( #1411 )
...
* Fixed acknowledging of channels
* using channel#lastMessageID and resolve when it's not present
2017-04-25 23:29:08 +02:00
Gus Caplan
c670209021
allow search('string here') ( #1408 )
2017-04-24 16:43:30 +02:00
Crawl
53eda09f72
Improve docs
2017-04-24 16:29:29 +02:00
SpaceEEC
401822a094
Made search argument optional, added useronly warning and fixed endpoint ( #1407 )
2017-04-24 14:31:39 +02:00
Gus Caplan
59e733cef6
deprecate aliases ( #1397 )
...
* hype
* add doc dep tags
* fix that
* hopefully fix docs
* Update TextBasedChannel.js
2017-04-24 08:05:24 +02:00
Crawl
96041dbd3a
Fix doc string
2017-04-23 08:51:07 +02:00
Crawl
6abe014ac3
Change theme prop type
2017-04-23 07:04:44 +02:00
Crawl
c095610bb4
Change docstring
2017-04-23 06:50:43 +02:00
Amish Shah
26069a44e2
nope i was right the first time
2017-04-22 21:23:20 +01:00
Amish Shah
3465a154d5
that should be 60 tbh
2017-04-22 21:20:50 +01:00
Amish Shah
eec79b5fd0
Increase WebSocket backoff time to alleviate reconnect issues
2017-04-22 21:16:58 +01:00
SpaceEEC
5b3e971c5c
Message.editedTimestamp should be a number ( #1402 )
2017-04-22 16:54:48 +02:00
Will Nelson
794c0e131d
how2docs ( #1400 )
2017-04-22 01:56:23 +02:00
Amish Shah
5605dc04e1
Fix #1399 (Trying to unset games with values other than null doesn't end up displaying properly for mobile clients)
2017-04-21 11:42:19 +01:00
Will Nelson
94e2a85386
Docs fixes ( #1398 )
...
* fix collector docs
* fix message collector param type
2017-04-21 09:44:59 +02:00
Isabella
a652901d60
Throw Error for non role-resolvables ( #1322 )
...
* throw error for role names/integers being provided for role resolvables
* Update RESTMethods.js
* Update RESTMethods.js
im really bad
* Update RESTMethods.js
* removed new promise reject
ty gus
* Update RESTMethods.js
* move error to guildmember.addRole method
* Update GuildMember.js
2017-04-19 18:57:54 +02:00
Will Nelson
ca34c43ba0
Add message reaction collectors & abstract collectors ( #1335 )
...
* message reaction collectors
* docs cleanup
* abstraction
* remove pointless method
* rename reaction collector creator method
* docs and stuff
* fix docs & build
* backwards compatibility, fix docs
* fix docs
* remove deprecated comments
* betterer docs again
* Fix documentation
* Fix Alias to not break depreciated code
2017-04-19 18:52:40 +02:00
Skiptir Engu
8475a4abee
Use libsodium.js if available ( #1390 )
...
* Use libsodium.js if available
* Style consistency
* Added peer dep and update README
* Link should point to npmjs 🤔
2017-04-19 18:35:45 +02:00
Crawl
27114eebf9
Commit those in LF too
2017-04-19 18:17:23 +02:00
Crawl
1897b4f4d6
Commit those in LF
2017-04-19 18:14:37 +02:00
Schuyler Cebulskie
b7e16ad4b8
Revert "use LF instead of CRLF ( #1392 )"
...
This reverts commit 5e522e0a2e .
2017-04-18 22:41:08 -04:00
Gus Caplan
5e522e0a2e
use LF instead of CRLF ( #1392 )
2017-04-18 21:43:05 +01:00
Gus Caplan
0d83f80fc0
Fix endless reconnection bug ( #1389 )
2017-04-17 12:32:26 +01:00
Mr. Sakamoto
4aa82b4fdf
fix Guild setOwner example ( #1383 )
...
* fix Guild setOwner docs
* hello s and bye s
2017-04-15 22:13:20 +02:00
Crawl
930519c494
Update AudioPlayer.js
2017-04-13 03:17:00 +02:00
Amish Shah
8ddaa1b92c
Merge branch 'master' of https://github.com/hydrabolt/discord.js
2017-04-12 21:22:14 +01:00
Amish Shah
78895ace17
Fix reactions not being uncached once they hit a count of 0
2017-04-12 21:22:08 +01:00
SpaceEEC
d54ef0eea4
fix ( #1375 )
2017-04-12 22:06:05 +02:00
Amish Shah
dce8e83465
Add VoiceConnection#dispatcher
2017-04-12 20:36:03 +01:00
Amish Shah
36c03909dd
Clean up AudioPlayer internals, change currentDispatcher and currentTranscoder to just dispatcher and transcoder
2017-04-12 20:32:50 +01:00
Amish Shah
9eaf1456b2
Clean up AudioPlayer internals, remove the concept of multiple "temporary" streams
2017-04-12 20:12:51 +01:00
SpaceEEC
d0c2b84659
Fixed Util.arraysEqual, made it better and updated its docs ( #1374 )
...
* commit
* improved docs
2017-04-12 19:37:31 +02:00
SpaceEEC
81d7dbdc76
Fix resolveEmojiIdentifier ( #1373 )
2017-04-12 17:15:23 +01:00
Lana Reeve
40c610987e
Improved EmojiIdentifierResolvable support ( #1361 )
...
* EmojiIdentifierResolvable now supports emoji IDs and pre-encoded unicode
* forgot to return the identifier and not the emoji itself
* using ? in JSDoc instead of |null
2017-04-12 06:32:18 +02:00
bdistin
c5e2ea7458
Break reconnect loop if you client.destroy in the disconnect event ( #1371 )
...
* Break reconnect loop if you client.destroy in the disconnect event
* fix lint/long line?
* God this is So UGLY, why...
* Update WebSocketManager.js
* Update WebSocketManager.js
2017-04-12 06:31:45 +02:00
aemino
39f7dc018a
Make FEC and PLP non-default ( #1372 )
...
I considered it might be useful to have something exposed that allows the end-user to set these if they want, but our current code doesn't allow for that. It'll remain an internal feature for the time being.
2017-04-12 06:30:48 +02:00
SpaceEEC
6187c17097
readded inviteLink endpoint ( #1369 )
2017-04-11 22:21:28 +02:00
xDdude
a49d4e6d43
getters for decibel and logarithmic volume ( #1355 )
...
* getters for decibel and logarithmic volume
I don't really understand where the conversion numbers come from but having this allows for an easy way to get the volume back based on what method you used to set it. I think the math is right, but yeah I've just used the conversion numbers from the other methods.
* fix trailing spaces
2017-04-11 18:21:00 +01:00
Drahcirius
84aab1021a
reaction remove fix ( #1366 )
2017-04-11 18:10:14 +01:00
Amish Shah
25e0048bbf
remove useless waiting reference
2017-04-11 17:59:27 +01:00
Gus Caplan
8dfc96d460
fix message acking ( #1368 )
2017-04-11 17:54:25 +01:00
Amish Shah
6495df50f9
Fix sequential rate limiting
2017-04-11 17:54:03 +01:00
bdistin
9365272baf
Fix embeds getting converted to collection on edgecase ( #1356 )
2017-04-10 14:30:06 -04:00
SpaceEEC
e60d2bd175
Fix MessageMentions properties always being null or empty ( #1357 )
2017-04-10 20:06:00 +02:00
Gus Caplan
0a56fa0aae
websocket cleanup ( #1346 )
...
* websocket cleanup
* resume event
* Update Resumed.js
* Update WebSocketManager.js
2017-04-10 20:02:17 +02:00
Gus Caplan
8436cbe8b1
Update User.js ( #1351 )
2017-04-10 16:20:07 +01:00
aemino
6d4fe89212
Volume stuff docs fixes ( #1354 )
...
* Volume stuff docs fixes
* 10/10 for spelling
2017-04-10 11:50:33 +01:00
Schuyler Cebulskie
3bc90dcbf1
Add export for MessageMentions
2017-04-10 03:21:14 -04:00
Schuyler Cebulskie
ebcf61ff9c
Remove MessageMentions constructor docs
2017-04-10 03:12:57 -04:00
Schuyler Cebulskie
4fa5ceed83
Fix some docstrings
2017-04-10 03:07:05 -04:00
Schuyler Cebulskie
fa016b6b41
Clean up Message#mentions and message updates
2017-04-10 03:01:50 -04:00
Crawl
878e5d7c76
Fix example typo
2017-04-10 00:39:07 +02:00
Gus Caplan
e5293647a3
(╯°□°)╯︵ ┻━┻ ( #1347 )
2017-04-07 12:13:13 +02:00
aemino
ab589fa5f2
VoiceConnection speaking bugfix ( #1343 )
...
Looks like I made a typo...
2017-04-06 16:20:34 +02:00
Crawl
d1d8179460
Revert "add auth session change handling" ( #1342 )
...
* Revert "User settings (#1337 )"
This reverts commit 801633b970 .
* Revert "add auth session change handling (#1339 )"
This reverts commit 5d85de0883 .
2017-04-06 13:50:31 +02:00
Gus Caplan
801633b970
User settings ( #1337 )
...
* user settings bruh
* remove development dump
* emit stuff
* i am so done
* Update ClientUserSettings.js
* modularize
* Update ClientUserSettings.js
* Update Constants.js
* Update ClientUserSettings.js
* Update RESTMethods.js
* Update ClientUserSettings.js
* <.<
2017-04-05 22:03:33 +02:00
Gus Caplan
5d85de0883
add auth session change handling ( #1339 )
...
* add auth session change handling
* eek
2017-04-05 21:52:55 +02:00
SpaceEEC
6ce24398ab
Fix messageReactionAdd internally & doc fix ( #1341 )
2017-04-05 21:34:14 +02:00
Amish Shah
970bfffc46
Fix emoji events ( fixes #1333 )
2017-04-05 17:05:27 +01:00
SpaceEEC
ecb8655dac
Document readonly and private properties ( #1338 )
2017-04-03 20:05:36 +02:00
Crawl
4be08406e6
Fix travis build error
2017-04-03 02:06:08 +02:00
Crawl
047cd2da5c
Fix fetchRecommendedShards
2017-04-03 01:51:15 +02:00
Crawl
6910585f69
Fix lowercase comments
2017-04-02 19:47:00 +02:00
aemino
8716702b59
Add FEC and PLP support for Opus encoding ( #1264 )
...
* Add FEC and PLP support for Opus encoding
* Silently fail if the Opus engine doesn't support CTL
* Fixed inversed max/min functions
2017-04-02 19:43:46 +02:00
Crawl
09489e2b9f
Fix indent on doc string
2017-04-01 21:19:39 +02:00
Isabella
d189b51da5
explicit content filter for guilds ( #1329 )
2017-04-01 21:16:30 +02:00
SpaceEEC
270bbc2731
to Endpoints.CND with you ( #1330 )
2017-04-01 21:16:15 +02:00
Crawl
7ffbbc7f07
Fix _sortedRoles in Role.js
2017-04-01 16:28:19 +02:00
Crawl
358131fb6f
Fix _sortedRoles in Guild.js
2017-04-01 16:27:55 +02:00
SpaceEEC
d2e3d6dc63
replaced 'del' with 'delete' ( #1328 )
2017-04-01 16:16:05 +02:00
Gus Caplan
cb3f6d9646
http rewrite (actually works this time!!1!) ( #1257 )
...
* rewrite http
* browser fun
* all the mimes dammit
* i need a newline
* whoops
* forgot about this
* use promises and HTTPRequest.method
* fluent
* move httpclient to external module
* branding
* middleware
* revert middleware
2017-04-01 09:04:01 +02:00
Gus Caplan
a4e0af2e45
make positions for channels and roles nicer ( #1211 )
...
* make role calculated position nicer
* make channels sortable in a nice way too
* stupid git web rebase editor
* Update Guild.js
* Update Guild.js
* Update Guild.js
* Update Guild.js
* Update RESTMethods.js
2017-04-01 08:28:54 +02:00
TimeForANinja
c4e5292516
resolve for not loggedin clients ( #1301 )
2017-04-01 08:05:46 +02:00
bdistin
bca101aac8
Fix for #1089 & Message Reactions ( #1236 )
...
* [requires more testing] Fix #1089
* Clean up unshift
* Remove <Message>.patch(data)
Nothing calls this method any longer. It is also a private method, so this shouldn't be a breaking change.
* Fix Message Reactions
Purposely reference previous reaction collections, so collection is consistant accross all message edits (no unnecisary data duplication). Makes #1221 extranious.
* Some Data Packets come Incomplete
And several properties can be falsy, so instead of || opted for hasOwnProperty().
* No reason MessageTypes should be an object...
* Use `prop in obj` isntead of hasOwnProp
per @Gawdl3y
2017-04-01 01:51:12 -04:00
SpaceEEC
07740955cf
Fixing stuff, borked by #1323 ( #1326 )
...
* several things
* see my comment
* Fixed missing stuff and returned undefined
2017-04-01 07:29:31 +02:00
Gus Caplan
305a7d14af
whoops ( #1325 )
2017-03-31 23:13:41 +02:00
Gus Caplan
e86ec7de6f
Update Constants.js ( #1324 )
2017-03-31 19:42:16 +02:00
Gus Caplan
1df3b84da6
rewrite endpoints for consistancy and modularity ( #1323 )
...
* rewrite endpoints for consistancy and modularity
* clean up a bit
* add missing endpoint
2017-03-31 18:36:09 +01:00