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