Commit Graph

43 Commits

Author SHA1 Message Date
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
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
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
Gus Caplan
84e4dd6a99 animated emojis (#2182) 2017-12-31 20:20:52 +01: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
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
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
e34bd7c09c fix(Errors): throw DiscordjsErrors where one would expect them (#1905) 2017-09-08 00:50:01 +02:00
SpaceEEC
c93c4ad21f refactor(Emoji): remove Guild#deleteEmoji in favour of Emoji#delete (#1877) 2017-09-03 12:01:47 +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
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
2aa2f73c74 Docs cleanup 2017-08-17 20:04:01 +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
Pg Biel
eef87e5d97 Reasons (#1715)
* Add reasons

* How could I forget

* Hopefully fix conflicts
2017-07-27 03:14:04 +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
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
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
Gus Caplan
5ecd5f7d69 REST API speed improvement (#1577) 2017-07-01 10:14:17 +01: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
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
Drahcirius
89745fe132 emojis should use cdn endpoint (#1425) 2017-04-28 18:47:18 +02:00
SpaceEEC
270bbc2731 to Endpoints.CND with you (#1330) 2017-04-01 21:16:15 +02:00
Gus Caplan
2897692cf1 fix created timestamp precision (#1241)
* fix created timestamp precision

* perf

* Update Snowflake.js

* gawdl3y was butthurt

* Update Snowflake.js
2017-03-09 18:31:31 -05:00
Programmix
a029999b09 Doc fixes, mostly pertaining to Snowflakes (#1218)
GUS!!!! @GusCaplan
2017-02-24 15:33:51 -05:00
Alex
18729b25c7 Add support to edit emojis (#1142)
* Add support to edit emojis

* Fixes for coding style.

* Add and use guildEmoji constants for updateEmoji

* Just use the Constant

* Fix typo in edit documentation

* Specify property types

* Fix ridiculous typo.

* Update Emoji.js
2017-01-30 22:47:05 -05:00
Gus Caplan
495264761c Add snowflake utils (#1064)
* snowflakes

* use proper binary for snowflake example

* fix jsdoc errors

* remove dupe
2017-01-05 15:41:42 +00:00
Schuyler Cebulskie
054d4655c1 Rearrange identifier 2016-12-30 21:05:37 -05:00
Amish Shah
cd657be8be Add functionality for GuildEmoji events 2016-12-26 19:21:00 +00: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
Programmix
fe3914658a Grammar cleanup (#875)
This commit:
* fixes inconsistencies (primarily regarding capitalization)
* fixes non-proper nouns that were improperly capitalized
* fixes reminents from not-so-meticulous copy+paste jobs
2016-11-05 23:57:34 +00:00
Amish Shah
d129457624 Improve emoji support 2016-10-27 16:12:02 +01:00
Schuyler Cebulskie
fc307fab8a Remove unnecessary array conversions 2016-10-16 21:14:59 -04:00
Schuyler Cebulskie
1e57c968dd Made date/timestamps consistent and less shitty 2016-09-27 19:46:53 -04:00
Schuyler Cebulskie
b7f582b7f0 Clean up a bunch of stuff
- Channel typing data is now a Map
- Client properties on structures are now non-enumerable and
non-configurable
2016-09-07 00:24:45 -04:00
Schuyler Cebulskie
7fea0a3937 Rename createdAt -> creationDate (#628)
* Rename createdAt -> creationDate

Also make it return a Date like it says, and small cleanup

* Build docs
2016-09-06 16:52:10 -04:00
HyperCoder
943767dc83 Add <User/Guild/Role/Channel>.createdAt (#620)
* Add Role.createdAt

* Add Channel.createdAt

* Add Guild.createdAt

* Add User.createdAt

* Change createdAt to Unix Timestamp

* Add createdAt to Emojis

* Change createdAt to Unix Timestamp
2016-09-05 15:59:27 +01:00
Schuyler Cebulskie
0b908f5bce Cleanup Part 2: Electric Boogaloo (Reloaded) (#594)
* Cleanup Part 2: Electric Boogaloo (Reloaded)

* Moar cleanup

* Tweak NOT_A_PERMISSION error
2016-09-04 10:08:09 +01:00
Schuyler Cebulskie
d97ce2e181 Remove all string object references (#586) 2016-09-03 16:58:28 +01:00
Schuyler Cebulskie
27652b94af Make JSDocs follow general conventions (#582)
* Make JSDocs follow usual conventions

* Fix StringResolvable name

* Make function lowercase
2016-09-03 09:57:25 +01:00
Amish Shah
5d06be6333 Add Emoji class 2016-08-29 15:18:41 +01:00