Commit Graph

79 Commits

Author SHA1 Message Date
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
Crawl
ac92d2cecc Improve docs a bit 2017-04-30 04:30:44 +02:00
Amish Shah
5b2ca326d4 ESLint pls >.> 2017-04-29 18:07:48 +01:00
Amish Shah
f7d65991d5 Minor refactor of Actions 2017-04-29 17:56:36 +01:00
Crawl
53eda09f72 Improve docs 2017-04-24 16:29:29 +02:00
Crawl
27114eebf9 Commit those in LF too 2017-04-19 18:17:23 +02:00
Schuyler Cebulskie
b7e16ad4b8 Revert "use LF instead of CRLF (#1392)"
This reverts commit 5e522e0a2e.
2017-04-18 22:41:08 -04:00
Gus Caplan
5e522e0a2e use LF instead of CRLF (#1392) 2017-04-18 21:43:05 +01:00
Schuyler Cebulskie
fa016b6b41 Clean up Message#mentions and message updates 2017-04-10 03:01:50 -04:00
SpaceEEC
6ce24398ab Fix messageReactionAdd internally & doc fix (#1341) 2017-04-05 21:34:14 +02:00
Amish Shah
970bfffc46 Fix emoji events (fixes #1333) 2017-04-05 17:05:27 +01:00
Gus Caplan
a4e0af2e45 make positions for channels and roles nicer (#1211)
* make role calculated position nicer

* make channels sortable in a nice way too

* stupid git web rebase editor

* Update Guild.js

* Update Guild.js

* Update Guild.js

* Update Guild.js

* Update RESTMethods.js
2017-04-01 08:28:54 +02:00
bdistin
bca101aac8 Fix for #1089 & Message Reactions (#1236)
* [requires more testing] Fix #1089

* Clean up unshift

* Remove <Message>.patch(data)

Nothing calls this method any longer. It is also a private method, so this shouldn't be a breaking change.

* Fix Message Reactions

Purposely reference previous reaction collections, so collection is consistant accross all message edits (no unnecisary data duplication). Makes #1221 extranious.

* Some Data Packets come Incomplete

And several properties can be falsy, so instead of || opted for hasOwnProperty().

* No reason MessageTypes should be an object...

* Use `prop in obj` isntead of hasOwnProp

per @Gawdl3y
2017-04-01 01:51:12 -04:00
Schuyler Cebulskie
136cab240d Add new ESLint rules 2017-03-17 01:23:39 -04:00
Schuyler Cebulskie
f3a7f59824 Several improvements
- Rename Guild#updateChannelPositions -> setChannelPositions
- Allow Guild#setChannelPositions to take ChannelResolvables
- Prioritise ClientDataResolver#resolveChannel's string case
- Minor cleanup
2017-02-25 15:29:32 -05:00
lipgloss
f068010e96 Implement 'Modify Guild Channel Positions' (#1198)
* Adding shuffleArray method to utils

* Shuffle channels functionality on guild.

* Comment fix

* Removing shuffle functionality and replacing with a simple update

* Code review changes to method/variable names

* Update comment reference to channelId as well

* Updating jsdoc with typedef of ChannelPosition
2017-02-22 20:24:05 +00:00
Schuyler Cebulskie
7232531eb1 Move all util methods into class
Remove TransformMessageOptions altogether
2017-02-15 22:25:18 -05:00
Gus Caplan
1e94a9e2a4 serious role position stuff (#1159)
* serious role position stuff

* kill meh

* Update Role.js

* Update Guild.js

* Update Role.js
2017-02-01 22:02:16 +00: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
Pg Biel
c7f5b44e03 Add User.lastMessage, GuildMember.lastMessage and TextBasedChannel.lastMessage (#1135)
* Add User.lastMessage

* User.lastMessage and GuildMember.lastMessage

* User, GuildMember and TextBasedChannel lastMessage

* Update MessageCreate.js
2017-01-26 21:24:08 +00:00
Gus Caplan
8c220e76ec Fix GuildDelete typing stopping (#1098)
* whoops

* ugh

* Update GuildDelete.js
2017-01-14 23:33:26 -05:00
Gus Caplan
e216fc7a81 stop spamming api, and kill typing when a guild isn't there anymore (#1096) 2017-01-14 17:31:52 +00:00
Schuyler Cebulskie
df02eee065 Fix Guild#large not being accurate for user accounts 2017-01-13 21:47:47 -05:00
Amish Shah
bf7767fe2c Rename emoji events 2016-12-26 21:30:27 +00:00
Amish Shah
cd657be8be Add functionality for GuildEmoji events 2016-12-26 19:21:00 +00:00
Gus Caplan
b177aefdd6 add user/member lastMessageID (#959)
* add user.lastMessageID

* stupid

* add member.lastMessageID
2016-12-06 23:46:32 -05:00
Amish Shah
b335824570 potentially fix #910, guild sync no longer assumes unknown users are new to the guild 2016-11-28 15:41:57 +00:00
Schuyler Cebulskie
3ef16f97c4 Remove dynamic requires 2016-11-20 20:52:39 -05:00
Crawl
3fd3588ef2 Fix reaction event names (#906) 2016-11-17 03:03:51 -05:00
Gus Caplan
b2bc844ed7 Add new MessageEmbed stuff (#898)
* fix

* Update MessageEmbed.js

* man

* Update MessageCreate.js

* Update MessageEmbed.js

* Update MessageEmbed.js

* clean up, add class

* my dreams are slowly becoming memes

* aghhh

* safety

* Update MessageEmbed.js

* Update MessageEmbed.js

* Update MessageEmbed.js

* dammit
2016-11-17 02:42:50 -05:00
York
1833a83664 Documented reaction events (#905) 2016-11-17 02:18:03 -05:00
Programmix
5ed8098af8 Clean up reactions, add remove all reactions (#890)
* Clean up reactions, add remove all reactions

* Reorganize reactions

* Re-add Gawdl3y's precious little inline

* Update Message.js
2016-11-13 02:29:26 -05:00
Programmix
6dc95cd084 Add support for notes (#860)
* Add support for notes

* Ensure consistency with notes from ready payload

* Add getter method for users

* Minor tweaks

* Update warning messages

* More minor fixes
2016-10-30 23:06:09 -04:00
Amish Shah
81059885a2 Start work on adding reaction support 2016-10-27 15:22:42 +01:00
Amish Shah
35ac80024a Rename some events (mainly guild events) 2016-10-26 15:52:40 +01:00
Amish Shah
e7e8a802b8 Fix docs 2016-10-26 15:14:28 +01:00
Amish Shah
0c4a4023ce Fix setting guild role positions (#751) 2016-10-26 14:19:36 +01:00
Gus Caplan
b020fae258 fix emoji updates (#826) 2016-10-22 23:43:07 -04:00
Amish Shah
530035e14b Fix stacked heartbeats on reconnect and fix documentation 2016-10-01 20:21:38 +01:00
Gus Caplan
aed75e1f9a Add full guild emoji functionality (#749)
* all the emoji stuff

* fix things for hydra 😘

* feck i need to stop committing on github

* update docs again

* Butts
2016-09-27 20:44:09 -04:00
Schuyler Cebulskie
ba8dd3467a Switch config back to camelCase 2016-09-27 18:42:32 -04:00
Amish Shah
03651fd6e3 Change how presences are handled 2016-09-25 14:16:03 +01:00
Amish Shah
0e8f1bef97 Stop comparing for equality on update events and just emit for performance 2016-09-25 11:24:02 +01:00
Amish Shah
f0a9a1353f prevent further user inaccuracies 2016-09-11 16:57:09 +01:00
Schuyler Cebulskie
7da00cf0fe Add long message splitting 2016-09-11 01:01:36 -04:00
Yannick Linke
6a53255ed5 Fixes typo in GuildRoleUpdate's documentation (#679)
See https://github.com/hydrabolt/discord.js/blob/7fe032c785/src/util/Constants.js#L156
2016-09-10 14:20:43 -04:00
Schuyler Cebulskie
465ff074e1 Prevent Guild.fetchMember from messing with fetchMembers 2016-09-07 23:12:36 -04:00
Schuyler Cebulskie
c7b4cf3d3f Add Guild.fetchMember 2016-09-06 20:36:58 -04:00
Programmix
17bee8084e Add Message.edits (#636)
* Add Message.edits

* Make travis happy

* Change @type for consistency
2016-09-06 19:20:35 -04: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