Commit Graph

370 Commits

Author SHA1 Message Date
Kyra
6be8172539 misc: add UNKNOWN_WEBHOOK error code (#2775)
* Add UNKNOWN_WEBHOOK error code

* docs: Update typings
2018-08-21 10:41:42 +02:00
Frangu Vlad
0401b8ad77 feat: handle and forward WEBHOOKS_UPDATE events (#2762)
* src: Handle WEBHOOK_UPDATE events

* Commit rename of 77'
Or adding the letter S

* I missed this

* Properly do this now
Typos everywhere

* Typings

* refactor: remove now unnecessary guild variable
2018-08-21 10:38:35 +02:00
Frangu Vlad
94214fa733 misc: Remove Clyde (#2764)
* Remove Clyde

* Remove Clyde avatar overwrite

* Remove Clyde from the user pattern
2018-08-18 13:21:24 +02:00
Frangu Vlad
1e0379375e cleanup: remove more left-over selfbot constants (#2761)
* misc: Remove left-over selfbot stuff

* Forgot this
2018-08-18 10:55:09 +02:00
Isabella
bb0700ade3 fix: Util#cleanContent parsing of GuildMember 2018-08-13 15:59:35 -05:00
Amish Shah
ea764afad2 add ClientPresence, remove ClientPresenceStore 2018-08-11 10:46:51 +01:00
Amish Shah
be5efea461 rewrite voice state handling 2018-08-10 14:44:59 +01:00
Kyra
0f63c50c06 fix: Util.basename being unreliable (#2679)
* fix: Util.basename being unreliable

new URL for WHATWG parsing was not chosen because it only works for URLs and threw in local pathes, path.basename is unreliable (according to the devs' note), and path.parse seems to work well.

* docs: Update Util.basename's description
2018-08-10 11:23:22 +02:00
Alex Hîncu
ce8a679a14 fix(Collection): use Symbol.species for creating derived collections (#2715) 2018-08-10 10:57:33 +02:00
Isabella
f3d7f7c3bd refactor: move Message#cleanContent function to Util (#2703)
* refactor: move Message#cleanContent function to Util

* suggested changes
2018-08-09 14:27:05 +02:00
1Computer1
8e0ea9aa16 Collection debug methods, remove deleteAll (#2577) 2018-08-09 14:25:07 +02:00
Amish Shah
98dc2df6d4 Revert "fix(Collection): use new this.constructor instead of new Collection (#2709)"
This reverts commit c10b4feeeb.
2018-08-07 19:08:51 +01:00
Alex Hîncu
c10b4feeeb fix(Collection): use new this.constructor instead of new Collection (#2709) 2018-08-07 18:08:49 +02:00
Yukine
b38f537da8 feat: Add new Permission PRIORITY_SPEAKER (#2698) 2018-08-03 20:19:19 -04:00
bdistin
5afd77ab73 refactor: remove user bot methods (#2559)
* [WIP] Remove user bots

* more backend userbot removal

* Add mfaEnabled back

* revert client presences store removal

* partially revert getAuth changes

* remove more no longer used children of ClientUserGuildSettings

* fix a bug with this pr and TextBasedChannel.applyToClass

* remove a syncGuilds reference

* more user bot data handling

* various guildSync cleanup

* bots can't call logout

Had the user/bot portions of the code mixed up. Though, does this need to be a promise anymore?

* make ClientManager#destroy() sync

It nolonger needs to be a promise, and nothing depended on it being a promise that I can tell.

* requested change

* Fix massive error

* no longer used as it's userbot only
2018-07-25 22:14:23 -04:00
PLASMAchicken
c46cbbfd84 docs: added sizes 16, 32, 64 (#2666)
* documented sizes 16, 32, 64

* Removed space

* Added typedef

* The options to provide => Options for the Image URL

* fixed
2018-07-25 21:04:47 -04:00
Lewdcario
41a1dee533 fix(Util): circular reference 2018-06-29 13:02:38 -05:00
Amish Shah
08bbbe9301 voice: handle new client_connect and client_disconnect packets 2018-06-22 18:38:33 +01:00
Amish Shah
1f7c1ddaa2 voice: start update to v4, fix heartbeats 2018-06-22 17:42:04 +01:00
Will Nelson
5e011dbc11 switch to node-fetch (#2587)
* switch to node-fetch

* remove useless var declaration

* remove method uppercasing

* rework concurrency

* Revert "rework concurrency"

This reverts commit ef6aa2697e.

* fix headers
2018-06-19 20:10:55 +02:00
Kyra
d02c303afd fix(Guild): equals method modifying features array of guild (#2544)
* Fixed a bug where Guild#equals would cause the given guild to lose its features

* Fix Util.arraysEqual

* Fixed docs for Util.arraysEqual

* Remove Util.arraysEqual
2018-05-29 11:15:19 +02:00
Kyra
30c7d6d1b1 feat(Guild#defaultMessageNotifications) (#2538)
* feat(Guild#defaultMessageNotifications)

* boolean -> DefaultMessageNotifications

* Space's requested change
2018-05-28 17:44:04 -05: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
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
bdistin
7a3a4d1388 feat: add Collection#sweep() (#2528) 2018-05-04 02:27:59 -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
bdistin
17d2c2efb8 docs(Collection): fix spelling of 'behavior' (#2529) 2018-05-03 08:00:56 +02:00
Amish Shah
b5f37728a7 feature: allow sweeping of inactive request buckets 2018-05-02 17:57:48 +01: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
SpaceEEC
f6216f3905 feat(SnowflakeUtil): allow snowflakes to be generated dynamically (#2459) 2018-04-17 09:00:18 -05:00
Pascal
85413481ed fix(DataResolver): always resolve with buffer when resolving urls
Fixes: #2379
2018-03-06 21:48:34 +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
Will Nelson
2a9fdef9e5 add valueOf method to permissions (#2363) 2018-02-28 16:48:06 +01:00
rei2hu
35babc706d Fix: discord sort method (#2355) 2018-02-23 21:18:42 -06: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
Kyra
a8172951d3 perf(Collection): Performance improvements (#2342)
* Update Collection.js

* ESLint
2018-02-16 10:19:30 +01: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
Gus Caplan
bd1bf11ed0 spotify stuff (#2314) 2018-02-02 12:45:18 -06:00
Lewdcario
d46eec4da4 fix(resolveColor): not interpreting DEFAULT correctly 2018-01-28 22:34:50 -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
Pascal
07c48a6845 fix: require discordjserror to throw meaningful errors where necessary 2018-01-22 20:23:36 +01:00
Amish Shah
e7375aa0fd Reimplement broadcast (un)subscribe events 2018-01-19 14:32:51 +00: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
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
bdistin
4122db0275 Return undefined from Collection.find() / findKey() (#2260)
To be compliant with Array.find() / findIndex()
2018-01-16 01:24:19 +01: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