Commit Graph

162 Commits

Author SHA1 Message Date
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
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
ec4c98704f refactor: make use of destructuring for Constants (#1942) 2017-09-16 20:31:36 +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
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
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
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
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
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
Amish Shah
7d750c4680 pass on error 2017-08-26 13:51:53 +01:00
Amish Shah
5a3b59b4b0 Fix #1685 2017-08-25 23:57:29 +01: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
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
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
Crawl
4adecf4aef 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-27 03:04:03 +02:00
Crawl
07178a0a2a Revert "rewrite ratelimiting and api route builder (#1667)"
This reverts commit a2eeafc75d.
2017-07-26 23:00:46 +02:00
Will Nelson
7eb9e65c41 check guild availability when aggregating client emojis (#1711) 2017-07-26 10:04:43 +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
Raphael
111fa2da93 Fix typo in client.voiceConnections docs (#1679)
Fix typo in client.voiceConnections docs
2017-07-11 05:42:14 +02:00
Crawl
0c34f3a313 Update dependencies & make webpack great again 2017-07-05 11:53:53 +02: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
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
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
SpaceEEC
201ecd25a2 renamed OAuth2Application#reset to resetSecret and added resetToken (#1541) 2017-06-24 23:26:09 +01: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
SpaceEEC
fce15ba33c Fix for bulkDelete, acknowledge, createInvite and remove some redundant stuff (#1515) 2017-05-21 22:04:57 +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
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
Amish Shah
8e5c600227 Make OAuth2Application backwards compatible again 2017-04-30 11:21:48 +01:00
Crawl
ac92d2cecc Improve docs a bit 2017-04-30 04:30:44 +02:00
SpaceEEC
956372731f Using ws.connection.status rather than undefined ws.status (#1429) 2017-04-28 21:27:30 +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
Schuyler Cebulskie
16fe48d405 Overhaul Permissions utilities (EvaluatedPermissions no more) 2017-03-06 02:22:42 -05:00
Programmix
a029999b09 Doc fixes, mostly pertaining to Snowflakes (#1218)
GUS!!!! @GusCaplan
2017-02-24 15:33:51 -05:00
Amish Shah
8a2ec437e5 Merge branch 'master' into indev-prism 2017-02-22 20:37:59 +00:00
Gus Caplan
61e12c637b Add support for more OAuth features (#1203) 2017-02-22 20:09:40 +00:00
Schuyler Cebulskie
f2a6c1d98c Improve Client docs a bit more 2017-02-21 14:02:29 -05:00
Schuyler Cebulskie
7232531eb1 Move all util methods into class
Remove TransformMessageOptions altogether
2017-02-15 22:25:18 -05:00
Schuyler Cebulskie
d6f17a9319 Merge branch 'master' into indev-prism 2017-02-06 01:54:31 -05:00
Schuyler Cebulskie
b859ba7639 Increase some documentation detail 2017-02-05 23:00:36 -05:00
Gus Caplan
59ff1d99ba fix types for snowflakes (#1156)
* fix types for snowflakes

* Update TextBasedChannel.js
2017-02-03 21:37:58 -05:00
Schuyler Cebulskie
e8ac18489e Merge branch 'master' into indev-prism 2017-02-01 15:29:45 -05:00
Gus Caplan
87b600f78f switch to os shim for safety (#1136)
* switch to os shim for safety

* Update Client.js
2017-01-26 21:21:43 +00:00
Schuyler Cebulskie
b13fdcc8d3 Merged master into indev-prism 2017-01-18 19:23:18 -05:00
Gus Caplan
3f4cbd07dd add voice region getting (#1108)
* add voice region getting

* clean up this mess

* add docstrings

* Update VoiceRegion.js

* Update RESTMethods.js
2017-01-18 19:14:44 -05:00