Commit Graph

23 Commits

Author SHA1 Message Date
Arthur
5b716c5b0c docs(ReactionManager): clarify cache Collection keys type (#4683) 2020-08-11 20:54:14 +02:00
Papaia
fc4bddf82a fix: grammatical errors in INVALID_TYPE errors (#4289)
* fix(GuildMemberRoleManager): grammatical error

* fix: eslint

* fix(GuildChannel): an

* fix(PermissionOverwrites): an

Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2020-06-04 13:02:28 +02:00
Sugden
88a62d5fea docs(GuildManager): resolve returns a GuildChannel (#4333) 2020-06-04 12:52:43 +02:00
SpaceEEC
407bc77d34 fix: in/de-crement max listener for client events (#4168) 2020-05-07 23:39:23 +02:00
Kevin
ec0227a476 feat(GuildMemberManager): nonce and chunk_count for _fetchMany (#4130)
Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
2020-05-04 12:48:33 +02:00
HarmoGlace
a88b7239b5 docs(RoleManager): everyone role can't be null (#3995)
* docs(RoleManager) : fix jsdoc everyone role can't be null

It fixes the jsdoc of RoleManager ; the everyone role of a guild can't be null

* Everyone role can't be null

* fix(typings): mark RoleManager#everyone as non-null

Co-authored-by: Crawl <icrawltogo@gmail.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-04-16 12:18:43 +02:00
Kevin
ff3454ef89 feat(GuildMemberManager): customisable timeout for _fetchMany (#4081) 2020-04-16 12:07:32 +02:00
SpaceEEC
4c2308b4c6 docs(MessageManager): document return type of delete (#4012)
* docs(MessageManager): document return type of delete

* docs(MessageManager): use Promise<void> over Promise

Co-Authored-By: Papaia <43409674+ItsPapaia@users.noreply.github.com>

Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2020-04-16 11:57:03 +02:00
izexi
a36a65b36a fix(MessageReaction): fetching a removed partial custom emoji (#3955)
* fix: handling GuildEmoji within fetch()

* refactor: remove unused "private" methods

* refactor: make use of Message#fetch() to patch
2020-03-17 18:52:43 +01:00
vzwGrey
e5264aba37 fix(GuildMemberRolesManager): type error should mention Role an… (#3931)
* fix(GuildMemberRoleManager): type error should mention that Role or Snowflake are fine too

* fix(GuildMemberRoleManager): comma instead of 'or'

* style: break long line
2020-03-14 13:38:51 +01:00
SpaceEEC
ca75eb509a fix(GuildEmojiManager): throw an error if image resolving fails (#3934)
* fix(GuildEmojiManager): throw an error if image resolving fails

* refactor(GuildEmojiManager): remove redundant if branch
2020-03-14 11:44:08 +01:00
Silver Shadow
3c653aafe8 docs(GuildMemberResolvable): an member -> a member (#3909)
an member -> a member
2020-03-08 16:00:43 +01:00
SpaceEEC
544bb78c8b refactor: make LimitedCollection an implementation detail (#3872) 2020-03-01 15:10:55 +01:00
Sugden
c7f4485cec docs(PartialRoleData): id is optional (#3866) 2020-03-01 15:10:46 +01: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
izexi
de4b4a0939 feat(GuildMemberStore): add options.withPresences to fetch() (#3562)
* feat: add options.withPresences to fetch()

feat: update presences if present on received data

typings: add user & withPresences to FetchMembersOptions

fix: checking for added options

ref: qol changes to return type

so that all members are fetched

oopsie

* fix: use Manager.cache

* fix(typings): tslint error

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-29 14:18:37 +01:00
Sugden
2ee0f1cdc6 feat(GuildManager): Allow for more options for GuildManager.cre… (#3742)
* typings: add GuildVerificationLevel and GuildExplicitContentFilter

* implement new types

* fix jsdoc on stores

* typo

* add more options for GuildStore#create

* add channels and roles

* update typings

* fix typings and use snake case for permissionOverwrites

* typings & jsdoc

* fix tslint

* remove trailing whitespace

* fix jsdoc

* fix jsdoc

* fix oopsies

* fix lint

* fix lint

* fix mr lint man

* add typedefs and support for setting channel parents

* fix tab indenation

* update jsdoc

* suggested changes

* style: fix silly format

* docs(PartialChannelData): name is not optional

* style: remove silly format
2020-02-29 07:43:42 +01:00
Sugden
91a025caaa feat: GuildEmoji & Invite to GuildResolvable (#3637)
* Add GuildEmoji to GuildResolvable

* Add GuildEmoji to GuildResolvable

* Add Invite to GuildResolvable

* Add Invite to GuildResolvable

* oops

* oops x2

* Add Guild#fetchBan and an error for not resolving the ID

* typings

* Revert "Add Guild#fetchBan and an error for not resolving the ID"

This reverts commit a4d0ed16e7.

* Revert "typings"

This reverts commit 5a54e88785.

* fix jsdoc

* add trailing comma
2020-02-24 18:27:34 +01:00
Sugden
bc5e2950d0 fix(ReactionManager): update message if partial (#3789)
* update message after fetching if it is partial

* suggested changes

Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-16 19:24:12 +01:00
Ryan Munro
62b227c2bd fix(BaseManager): BaseManager#valueOf should return cache (#3776)
* BaseManager#valueOf should return cache

* Update Util#flatten to handle valueOf being a Collection

* Update Util.js - typo

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
2020-02-12 22:26:17 +01:00
Androz
94bb268639 docs: add extends to ChannelManager, cache is not nullable, resolveID accepts an object (#3771)
* Add extends to docs

* Cache shouldn't be nullable

* jsdoc: use same type for both resolve methods
2020-02-12 18:36:08 +01:00
SpaceEEC
92bc634520 docs(*Manager): fix child classes' cache type annotations (#3777) 2020-02-12 18:28:25 +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