Commit Graph

21 Commits

Author SHA1 Message Date
SpaceEEC
9bd3689fb1 fix: assert channel types in message actions (#6919) 2021-11-01 18:40:19 +01:00
SpaceEEC
a8c21cd754 fix(Message): avoid overwriting properties in _patch (#6738) 2021-10-03 15:27:00 +02:00
ckohen
cd47a524af refactor(Message): combine patch methods (#6071) 2021-07-22 09:05:38 +01:00
Matt (IPv4) Cowley
c412cd7521 feat(Message): add messageEditHistoryMaxSize to limit stored msg edits (#4867) 2020-10-17 15:34:49 +02:00
Amish Shah
5c3f5d7048 Partials (#3070)
* Remove GroupDMChannels

they sparked no joy

* Start partials for message deletion

* MessageUpdate partials

* Add partials as an opt-in client option

* Add fetch() to Message

* Message.author should never be undefined

* Fix channels being the wrong type

* Allow fetching channels

* Refactor and add reaction add partials

* Reaction remove partials

* Check for emoji first

* fix message fetching

janky

* User partials in audit logs

* refactor overwrite code

* guild member partials

* partials as a whitelist

* document GuildMember#fetch

* fix: check whether a structure is a partial, not whether cache is true

* typings: Updated for latest commit (#3075)

* partials: fix messageUpdate behaviour (now "old" message can be partial)

* partials: add warnings and docs

* partials: add partials to index.yml

* partials: tighten "partial" definitions

* partials: fix embed-only messages counting as partials
2019-02-13 17:39:39 +00:00
Gus Caplan
42505b78c1 chore: add strict mode (#2974) 2018-12-03 15:19:10 -06: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
Crawl
ac92d2cecc Improve docs a bit 2017-04-30 04:30:44 +02:00
Schuyler Cebulskie
fa016b6b41 Clean up Message#mentions and message updates 2017-04-10 03:01:50 -04: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
7232531eb1 Move all util methods into class
Remove TransformMessageOptions altogether
2017-02-15 22:25:18 -05:00
Amish Shah
0e8f1bef97 Stop comparing for equality on update events and just emit for performance 2016-09-25 11:24:02 +01: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
Schuyler Cebulskie
59a5862f2d Clean up Actions code (#591) 2016-09-03 22:48:51 +01:00
Amish Shah
65350348a8 Document all the events 2016-08-20 00:15:09 +01:00
Amish Shah
82ab92ca2a Migrate most of the Client Data Store to Clien 2016-08-19 22:21:34 +01:00
Amish Shah
4f4ec3146b Store Channel Messages in Maps 2016-08-19 21:12:01 +01:00
Amish Shah
b8db4c4f4b ESLint stuff... 2016-08-13 14:44:49 +01:00
hydrabolt
90cf787759 I think I got ChannelUpdate working?? 2016-04-30 18:22:09 +01:00
hydrabolt
e9d7dfaee3 Added message.edit(content) 2016-04-24 17:30:58 +01:00