Commit Graph

35 Commits

Author SHA1 Message Date
Sugden
1e8f01253e refactor: new node features (#5132)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-30 21:40:33 +01:00
Jan
261612596d feat(MessageMentions): add repliedUser (#5905) 2021-06-25 11:07:31 +01:00
Shubham Parihar
1ac9a2eb5b refactor(*): make typedefs for all options params (#5785)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-06-13 19:32:54 +01:00
GrapeColor
565d7b3747 fix(MessageMentions#channels): Fix type of channels of mentions (#5370) 2021-04-15 00:34:13 +02:00
anandre
8c8883ef26 Remove Guild#member (#4890) 2020-11-22 19:21:01 +01:00
Jan
214981f0b1 feat(MessageMentions): fix typings/docs, add resolvables support (#4339) 2020-06-19 11:43:19 +02:00
SpaceEEC
cd746f3069 fix(message_mentions): lazy require GuildMember to avoid circular (#3877) 2020-03-01 20:27:47 +00:00
Crawl
c065156a88 chore: consistency/prettier (#3852)
* chore: consistency/prettier

* chore: rebase

* chore: rebase

* chore: include typings

* fix: include typings file in prettier lint-staged
2020-02-29 14:35:57 +01:00
BorgerKing
bbdbc4cfa7 feat: remove datastores and implement Managers (#3696)
* Initial commit: add 5 initial managers

- Base manager
- GuildChannelManager
- MessageManager
- PresenceManager
- Reaction Manager
- Added LimitedCollection

* Add GuildEmojiManager, various fixes

* Modify some managers and add guildmembermanager

* Initial integration

* Delete old stores

* Integration part two, removed LRUCollection

- Most of the integration has been finished
- TODO typings
- Removed LRUCollection, needless sweeping

* Typings + stuff i somehow missed in ChannelManager

* LimitedCollection typings/ final changes

* Various jsdoc and syntactical fixes, Removed Util.mixin()

* tslint fix

* Grammatical and logical changes

* Delete temporary file placed by mistake

* Grammatical changes

* Add missing type

* Update jsdoc examples

* fix: ChannelManager#remove should call cache#delete not cache#remove

* fix recursive require

* Fix missed cache in util

* fix: more missed cache

* Remove accidental _fetchMany change from #3645

* fix: use .cache.delete() over .remove()

* fix: missing cache in ReactionCollector

* fix: missed cache in client

* fix: members is a collection not a manager

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix: various docs and cache fixes

* fix: missed cache

* fix: missing _roles

* Final testing and debugging

* LimitedCollection: return the Collection instead of undefined on .set

* Add cache to BaseManager in typings

* Commit fixes i forgot to stage yesterday

* Update invite events

* Account for new commit

* fix: MessageReactionRemoveAll should call .cache.clear()

* fix: add .cache at various places, correct return type

* docs: remove mentions of 'store'

* Add extra documented properties to typings

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-11 20:21:07 +01:00
SpaceEEC
6302afb84b docs(MessageMentions): channels are actually in order (#3705)
* docs(MessageMentions): channels are actually in order

* docs(MessageMentions): readd info about order for channels

* docs(MessageMentions): reword info to account for rtl locales
2020-01-19 13:06:21 +01:00
Souji
7f99be739a docs(MessageMentions): add sort order notice (#3693)
* mention order returned from API
* not left to right in text
2020-01-14 11:28:19 +01:00
SpaceEEC
97eac663b3 feat(MessageMentions): cache mentioned members (#3601) 2019-12-27 19:28:04 +01:00
Vlad Frangu
a4f06bdffd src: support new message fields (#3388)
* src: Update channel pattern

* src: Remove useless non-capture group

* src: it's as though we're starting fresh

* src: Bring this up to date for reals now

* src: typings and a bug fix

* src: Add crossposted channels to message mentions

* src: Requested changes and add typings

* src: Move Object.keys outside loop

* typings: Fix enum being exported when it shouldn't

* src: Consistency with roles and users

* docs: Correct docstring for MessageFlags#flags

* docs: Correct docstring for MessageMentions#crosspostedChannels

* docs: Suggestions
Co-authored-by: SpaceEEC

* src: Reset flags to 0 if no flags are received on MESSAGE_UPDATE
2019-10-01 11:01:55 +02:00
Gryffon Bellish
d280d1b03f style: change let to const in MessageMentions (#3483) 2019-09-24 17:36:19 +02:00
Gus Caplan
42505b78c1 chore: add strict mode (#2974) 2018-12-03 15:19:10 -06:00
Frangu Vlad
94214fa733 misc: Remove Clyde (#2764)
* Remove Clyde

* Remove Clyde avatar overwrite

* Remove Clyde from the user pattern
2018-08-18 13:21:24 +02:00
Kyra
e8ab049a67 refactor(MessageMentions): make client, guild, and _content non enumerable 2018-06-16 17:14:10 +02: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
Isabella
9eac19d9d8 refactor: more oop with stores (#2216)
* refactor: more oop with stores

* forgot bulk delete

* Revert "forgot bulk delete"

This reverts commit 1b4fb999ee07b358ee6e1af9efb8981b84f83af1.

* appease linter

* missed some


shh

* fail
2018-01-11 16:33:30 +00:00
1Computer1
2f84d95077 Add more options to MessageMentions#has (#2131)
* Add more options to MessageMentions#has

* Rename ignoreSelf to ignoreDirect
2017-11-26 10:58:17 +01:00
SpaceEEC
258fc4ecf3 Fix MessageMentions#has not returning true for role mentions (#1840) 2017-08-27 23:51:15 +02: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
Will Nelson
2c763073d7 add capture groups to MessageMentions and validate snowflake ranges (#1612)
* add capture groups

* update patterns to valid snowflake ranges
2017-08-20 23:26:13 +02:00
iCrawl
2aa2f73c74 Docs cleanup 2017-08-17 20:04:01 +02:00
SpaceEEC
d9262f2682 Added and fixed a bunch of docs stuff (#1767)
- Fixed a common copy paste fail `the the <thing>` in various places
- Apparently I can't type Resolvable correctly,
Fixed that wherever applicable
- Documented GroupDMChannel#nicks so that it will be displayed on the docs
- GroupDMChannel#icon is nullable
- Removed empty InviteOptions typdef, as its properties are now documented in GuildChannel#createInvite
- MessageMentions#channels is no longer nullable
- RoleData#permissions takes a PermissionResolvable or an array of them
- Webhook#avatar is nullable
- Added HTTPOptions typedef and added it to ClientOptions typedef
- ClientUserChannelOverride#muted is for a channel and not a guild directly
2017-08-10 20:31:10 +02:00
Gus Caplan
963cf42e0d add MessageMentions#has, remove old method (#1724)
* Update MessageMentions.js

* remove old method

* smh

* Update Message.js

* Update MessageMentions.js

* Update MessageMentions.js

* Update MessageMentions.js
2017-08-01 04:49:00 +02:00
meew0
83f2c62c3f Fix the mention example in the USERS_PATTERN doc comment
Previously it was a channel mention. Thanks @Hackzzila.
2017-05-10 13:11:21 +02:00
Crawl
ac92d2cecc Improve docs a bit 2017-04-30 04:30:44 +02:00
Schuyler Cebulskie
e2c8ba5be0 Allow MessageMentions#channels to function in DMs 2017-04-29 20:18:23 -04:00
Schuyler Cebulskie
aa35e21b84 Revert "Make MessageMentions#channels return an empty collection in DMs (#1430)"
This reverts commit 88aa947376.
2017-04-29 20:00:36 -04:00
SpaceEEC
88aa947376 Make MessageMentions#channels return an empty collection in DMs (#1430)
* Make MessageMentions#channels return an empty collection in DMs

* reduce code duplication and corrected docstring
2017-04-29 14:33:18 +01:00
SpaceEEC
e60d2bd175 Fix MessageMentions properties always being null or empty (#1357) 2017-04-10 20:06:00 +02:00
Schuyler Cebulskie
ebcf61ff9c Remove MessageMentions constructor docs 2017-04-10 03:12:57 -04:00
Schuyler Cebulskie
4fa5ceed83 Fix some docstrings 2017-04-10 03:07:05 -04:00
Schuyler Cebulskie
fa016b6b41 Clean up Message#mentions and message updates 2017-04-10 03:01:50 -04:00