* 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>
* docs: document constructors of extendible structures
* docs(ClientPresence): document default value for data parameter
Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>
* docs(Presence): document default value for data parameter
Co-Authored-By: SpaceEEC <spaceeec@yahoo.com>
* docs(DMChannel): capitalize DM in the constructor doc
* abstract BitField from Permissions
* reduce useless code, improve docs
* add a ReadOnly identifier to the return type of Bitfield#freeze()
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-1.html#partial-readonly-record-and-pick
* fix the RangeError
* update docs, convert Speaking and ActivityFlags to bitfields
* fix some docs
* Fix Speaking BitField oops
* docs for oops
* more incorrect docs
* Fix incorrectly named property
* add new classes to index
* fix missing @extends docs
* default bitfield resolve to 0, and cleanup defaulting everywhere
Also removes GuildMember#missiongPermissions() alias that had incorrect behavior
* Breaking: Rename Overwrite allowed and denied to allow and deny
To be consistent with the api's naming
* fix setSpeaking usage to bitfields instead of booleans
* fix speaking bug in playChunk
* docs: Updated typings
* fix: BitFieldResolvable should use RecursiveArray
* bugfix/requested change
* typings: Cleanup (#2)
* typings: Fix BitField#{toArray,@@iterator} output type
* typings: correct PermissionOverwrites property names and nitpicks
* 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"
* Fix typo in setPosition
* Same typo in Role
* Fix edit with position breaking when the position was 0
* Eslint
* Revert code but fix the position issue
* fix Permissions.add/remove, by completely changing what they do
* permissions cleanup
Removes overwrite._denied and overwrite._allowed in favor of overwrite.denied.bitfield and overwrite.allowed.bitfield
uses the modified Permissions.add and Permissions.remove to clean up existing code
fixes GuildMember.missingPermissions
changes Permissions add/remove to reverse loops for speed, changes resolve to allow the number 0 as a valid permission.
* Revert createChannel overwrite.allow / overwrite.deny for arrays of {allow:bitfield, deny:bitfield}
Documentation should be improved here, although I would need advice. I believe a overwrite object typedef is needed, to show the structure of the object, and also include that collections may be used for this, rather than arrays.
* api router fix for overwritePermissions
* add Permissions.freeze, and change all returned Permissions to immutable instances
* Make Permissions a permission resolveable
change role.permissions to be an instance of Permissions
* Make permissions.add/remove return a new instance if the instance is frozen
* Fix invalid error
* Update GuildChannel.js
* Update Guild.js
* fix bad merge
* 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
* Fix docs for Guild#pruneMembers
* ClientApplication returns
* Guild#deleteEmoji
* Guild#setRolePosition takes RoleResolvable
* Client#fetchApplication returns ClientApplication not Oauth2Application
* ClientDataResolver#resolveImage can return null
* ClientApplication#toString small example
* Guild#allowDMs now has a only for user accounts warning
* ClientUserSettings#patch is private and setGuildPosition has a user account warning
* Role#setPermissions can take PermissionResolvable, not just String
* ChannelCreationOverwrites is for a role or a member, not for a "group"
* Fix ChannelData#userlimit string being wrong
"The user limit of voice the channel" :lul:
* ChannelResolvable is only for Channel or Snowflake
* EmojiIdentifierResolvable supports Snowflakes
* UserResolvable doesn't take a guild
* Make patch functions private
* Remove examples
* Webhoox#edit options.name defaults to the webhook name
* Make VoiceConnection functions private
* Am dum
The whole ClientUserSettings category is only for self bots soo
* Value for update functions is *
* Make update functions be private
* Fix GuildEditData missing Ssytemchannel property
* PermissionOverwriteOptions can accept null as an option
(Why did no-one document this?)
* 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!
- 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
* 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.