Commit Graph

444 Commits

Author SHA1 Message Date
Schuyler Cebulskie
95790dcf08 Update User#equals doc 2016-12-29 03:21:22 -05:00
Schuyler Cebulskie
1b76333b8b Add missing @typedef line 2016-12-29 03:04:11 -05:00
Schuyler Cebulskie
fe7ed523b3 Improve ClientUser presence method docs 2016-12-29 03:01:34 -05:00
Gus Caplan
ed8fcf651a Centralise message sending logic in one method, remove sendTTSMessage, add client shortcut in RESTMethods (#1031)
* start wip rewrite of sending/editing messages

* pass the build, modify the edit method to fit the new system

* simplify the applyToClass method

* change handling of file options

* add back message splitting

* i couldn't help myself

* add some smart message options

* clean up, add sexy options

* fix indentation

* fix up splitting

* add \b

* add back old methods for hydar happiness

* clean up more

* move code handling to the rest method

* clean up this.rest.client

* Update TextBasedChannel.js

* add docs back for the bad methods

* fix reply in group dms

* srsly gawdl3y

* make code better

* fix changes for gawdl3y

* fix checking

* remove getter

* make code handling more robust

* k

* fix up sendEmbed docs

* stupid

* fix up more docs because aaaaa

* no more pls
2016-12-28 23:58:30 -05:00
Gus Caplan
3451367591 fix the everyone role mentioning (#1032) 2016-12-28 19:04:54 +00:00
Zack Campbell
265021bfa5 Add sendEmbed to GuildMember for docs (#1028)
* Add sendEmbed to GuildMember for docs

* Update GuildMember.js
2016-12-27 22:35:11 -05:00
Schuyler Cebulskie
758c801dd5 Change to function declaration 2016-12-26 15:40:34 -05:00
Alexander
b1473b1e4c Change RichEmbed to take StringResolvables (#1010)
Changed RichEmbed to take StringResolvables for all title, name, value and
description arguments.

Also changed a few lines in setColor to make sure that the value
assigned to this.color is always a number.
2016-12-26 15:39:07 -05:00
Amish Shah
cd657be8be Add functionality for GuildEmoji events 2016-12-26 19:21:00 +00:00
Amish Shah
2ab5bae69a change let to const 2016-12-23 18:38:48 +00:00
Amish Shah
e63432c18e Fix editing role positions (fixes #864) 2016-12-23 16:45:47 +00:00
Gus Caplan
e6a041241b cleanup ws ratelimiting, and apirequest (#957)
* cleanup ws ratelimiting, and apirequest

* cleanup timestamps

* clean up timestamps
2016-12-23 14:37:43 +00:00
Gus Caplan
cecb0aee02 Update User#setEmail/setPassword/setUsername (#991)
* fix some things with user updates and tokens and such

* fix stupid

* Update ClientUser.js

* Update ClientUser.js
2016-12-22 15:12:29 -05:00
Gus Caplan
84503c8877 add User#dmChannel (#1005)
* add User#DMChannel

* Update User.js

* Update User.js
2016-12-20 23:36:43 +00:00
Gus Caplan
e392107369 add ClientUser#fetchMentions (#999)
* add ClientUser#fetchMentions

Signed-off-by: Gus Caplan <gus@localhost.localdomain>

* ugh

* Update ClientUser.js

* Update ClientUser.js

* Update ClientUser.js
2016-12-19 02:16:27 -05:00
Gus Caplan
a0a3989e59 fix issue with uncached channels and adding members (#1001)
* fix this thing

* fix a silly

* Update Guild.js
2016-12-19 02:11:55 -05:00
Schuyler Cebulskie
361547a588 Fix a bunch of capitalisation issues 2016-12-15 20:10:38 -05:00
Gus Caplan
2e7472bb1a just webpack things (#988) 2016-12-14 19:40:47 -05:00
Alexander
264ee8e7f1 Equals updates (#987)
* Docs update

Changed the param names and param descriptions to be consistent.

* Added === comparison

Changed Presence.equals and Game.equals to first compare using ===

* Collection.equals fix

Now returns false when collection is undefined, instead of crashing
💯
2016-12-14 17:10:34 -05:00
Alexander
906bb3c5f3 Utilise Collection#equals for structures' equals (#986)
Utilizing Collection.equals in GuildChannel.equals
Utilizing Collection.equals in GroupDMChannel.equals
2016-12-14 15:35:40 -05:00
Schuyler Cebulskie
bef0523ebf Capitalise ID in Guild#applicationId 2016-12-14 13:04:40 -05:00
Schuyler Cebulskie
4e76251aa2 Fix some Gus stuff 2016-12-14 12:37:23 -05:00
Gus Caplan
8139bef4e2 add some missing properties (#978)
* add premium to profile

* add other missing stuff
2016-12-14 17:23:22 +00:00
Perry Berman
78026df1df fix defaultAvatarURL (#983)
looks like someone forgot how to caps
2016-12-13 20:43:28 -05:00
Cole
586d652c16 Quality of life changes (#968)
* + Added function to get a user's default avatar
+ Added HOST constant to Constants
+ Added assets endpoint
+ Added quality of life function to get a user's avatar or default avatar
+ Added quality of life function to get member's nickname or username

* * Fixed invocation of a getter.

* Fixed lint issue

* Made the API constant use the HOST constant for DRY-ness
Changed DOC comment to be more descriptive

* Update GuildMember.js
2016-12-12 22:34:19 -05:00
bdistin
3193df792e Added Missing Author URL Option (#979) 2016-12-12 22:29:39 -05:00
Gus Caplan
d766e727a1 add GuildChannel#clone (#973)
* add GuildChannel#clone

* e
2016-12-11 09:07:52 +00:00
bdistin
710d3db94f RichEmbed Tweaks/Improvements (#964)
* RichEmbed Tweaks/Improvements

Changed .addTimestamp() to .setTimestamp() to bring it inline with all other single value settings.
Changed Field value to StringResolveable from String to bring it inline with typical sendMessage functionality.

* Lint Fix

* Remove Default, Add check for undefined
2016-12-09 22:10:50 -05:00
Slamakans
b79a91b3a9 new errors for richembed yay (#966)
* Update faq.md (#949)

* fix docs

* Revert "fixed typo in documentation" (#950)

* new errors for richembed yay

Simplified the parsing for color arrays.

Throwing some errors on values that would result in Bad Requests.

Changed setAuthor and setFooter's icon parameter to icon_url to match
the embed object's property name.

Changed the docs for setFooter to reflect that icon_url is optional.

* changed docs instead of arg names

* capitalization
2016-12-09 22:09:55 -05:00
Gus Caplan
c5f93eb44e Add more MessageEmbed stuff (#970)
* this is why wrapping data 1:1 is a bad idea

* ffs

* whoever wrote role.hexColor is a bad, bad person

* Update MessageEmbed.js

* Update MessageEmbed.js
2016-12-09 22:07:34 -05:00
Gus Caplan
b177aefdd6 add user/member lastMessageID (#959)
* add user.lastMessageID

* stupid

* add member.lastMessageID
2016-12-06 23:46:32 -05:00
Zack Campbell
37bfdd154c Fix embed footer text length error (#955) 2016-12-05 20:50:25 -05:00
Zack Campbell
daa79b7f97 Add more errors for RichEmbed builder char limits (#954)
* Add more errors for RichEmbed builder char limits

Might as well if we're erroring on number of fields when that's the one limit that doesn't actually throw a bad request.

* Fix name.length check in previous commit

* Update RichEmbed.js

* Update number of fields error message
2016-12-05 20:33:58 -05:00
Schuyler Cebulskie
977e29ceba 👏 @Programmix 2016-12-04 20:25:24 -05:00
Gus Caplan
638e51a18c support new guild member role endpoints for cleaner role updates (#901)
* support new roles endpoints

* use promise chaining

* properties man

* Update RESTMethods.js

* Update RESTMethods.js

* Update RESTMethods.js

* Update RESTMethods.js
2016-12-02 23:46:55 -05:00
Programmix
8b7ef0c850 Add Message.fetchWebhook (#947)
* Add Message.fetchWebhook

* Update Message.js
2016-12-02 22:59:44 -05:00
Schuyler Cebulskie
c0aa6bd30f Work around Node's module loading 2016-12-02 22:55:37 -05:00
Schuyler Cebulskie
6adc8a9d0d Move a getter around 2016-12-02 22:47:12 -05:00
Programmix
676a895da7 Add Message - webhookID, isMemberMentioned (#946)
* Add Message - webhookID, isMemberMentioned

* Update Message.js

* Update Message.js

* Update Message.js

* Update Message.js
2016-12-02 22:35:01 -05:00
Gus Caplan
6cfbf76406 add more embed stuff (#939)
* add fun embed stuff

* add more docstrings

* fix gawdl3y

* Update RichEmbed.js
2016-12-02 21:59:38 -05:00
Schuyler Cebulskie
2488e1a00f Improved the definition of structures' client properties 2016-12-02 19:52:27 -05:00
Gus Caplan
edfb27f428 switch to cdn endpoints, add guild splash url (#932) 2016-12-01 19:33:15 -05:00
Amish Shah
6043a1f83a Fix #937 (guild member presence before READY) 2016-11-30 20:31:07 +00:00
Schuyler Cebulskie
57af84bc95 Clean up Guild#setRolePosition slightly 2016-11-27 20:09:41 -05:00
Schuyler Cebulskie
6dc93a0184 Simplify Role#setPosition 2016-11-27 20:03:44 -05:00
Schuyler Cebulskie
8e7cb7fc4e Revert "Escape the backslash (#931)"
This reverts commit 5fb4e257c8.
2016-11-27 18:31:27 -05:00
Vap0r1ze
5fb4e257c8 Escape the backslash (#931) 2016-11-27 22:38:42 +00:00
Schuyler Cebulskie
cc9e484276 Fix a thing Gus noticed 2016-11-27 16:23:17 -05:00
Amish Shah
e2932c05f2 whoops fix derp 2016-11-26 22:43:41 +00:00
Amish Shah
27e77d3839 Fix Role.setPosition not returning Role (addresses #902) 2016-11-26 22:42:33 +00:00