* docs(MessageMentionTypes): correct type
* docs(MessageMentionTypes): change role to roles
* docs(MessageMentionOptions): correct description to allow usage as an array
* remove unneeded part of description
Co-Authored-By: Ryan Munro <rsm999@uowmail.edu.au>
* docs: add DisableMentionType to remove literal string types
Co-authored-by: Ryan Munro <rsm999@uowmail.edu.au>
* feat(Allowed Mentions): Add support for new Allowed Mentions message options
* fix(docs): Update JSDoc for feature
* fix(apimessage): translate the propery into snake_case
* fix(typings): message mention options should be optional
* fix(docs): jsdoc typings for MessageMentionOptions
* fix(mentions): use Resolvables for MessageMentionOptions
* fix(docs): typedef for MessageMentionTypes
* Update typings/index.d.ts
Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>
* fix(mentions): drop support for Resolvables
* fix(AllowedMentions): remove the whole resolve function
* fix(docs): revert change to Resolvables
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
* User input sanitation: reimplement disableEveryone into disableMentions
* Change default value of ClientOptions#disableMentions to 'none'
* Update type declarations of disableMentions to include default
* update for compliance with ESLint
* Overlooked these files. Updated for complete compliance with ESLint
* add ClientOptions#disableMentions and MessageOptions#disableMentions
* provide tests
* don't sanitize controlled mentions
* add @here mentions to tests
* fix indents (6 spaces instead of 8)
* add Util#cleanContent tests
* add typings for removeMentions
* replace @ with @\u200b AFTER cleaning content as suggested instead of using removeMentions
* better explanation of this option
* no newline in Util.removeMentions
* fix long line
* remove double space
* remove comments (change has been reverted)
* Use Util.removeMentions to remove mentions
* use Util.removeMentions in Util.cleanContent
* 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>
* Rework createMessage
- MessageAttachment is now structurally similar to FileOptions
- No longer mutates the object passed as options
- Supports more permutations of arguments
* Ignore complexity warning
* Refactor name finding
* Fix typo
* Update typings
* Default name to null for MessageAttachment
* Make Message#reply use transformOptions
* Move transformOptions
* Fix Message#reply
* Fix mutation
* Update tests
* Fix options passing
* Refactor into APIMessage
* Fix webhook send
* Expose APIMessage
* Add documentation
* Add types
* Fix type doc
* Fix another type doc
* Fix another another type doc (is this one even right!?)
* Remove trailing comma
* Properly clone split options
* Add support for sending file as stream
* Missed a doc
* Resolve files only once when splitting messages
* This looks nicer
* Assign directly
* Don't cache data and files
* Missing return type
* Use object spread instead Object.assign
* Document constructors
* Crawl is a little dot
* comp pls
* tests: sanitize local file path, disable no-await-in-loop
* Hide Webhook#token (consistency with Client#token)
* Make `Webhook#token` writable
* fix: devsnek's requested change
Webhook#token must be both writable and configurable.
* docs: fix documentation in various places
All stores: resolveID returns a nullable Snowflake
GuildAuditLogs: ActionType also can be ALL
MessageEmbed: make files property show up in the docs
ClientApplication: resetSecret and resetToken return a promise
ClientManager: status is readonly
Guild: features is an array of strings and ban no longer accepts a number or string
Guild: ban method no longer accepts a string or number
GuildMember: ^
RichPresenceAssets: small and large Image are Snowflakes, also fixed parameter documentation for small and large image url method
WebhookMessageOptions: file property is no longer a thing
* docs: improve GuildAuditLogs documentation
Prefix types with AuditLog to avoid confusion
Document GuildAuditLogs' static Targets and Actions properties and add necessary typedefs
Use typdefs over primitives where possible.
* fix documentation for Guild#defaultRole
* tinify webpack
* meme
* fix long version
* more changes
* even smoler
* fix up logic
* fix build
* undo changes to user agent manager because its not webpack'd anymore
* the heck
* fix stupid
* clean up browser rules
* typo
* 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
* refactor(Attachment): Merge MessageAttachment with Attachment
* refactor(Attachment): Rename setup to _patch for consistency
* refactor(MessageAttachment): Global rename of Attachment class
* refactor/fix(DataStores): move instantiating of store related classes into the relevant create methods and fixed FetchMemberOptions
* Renamed ChannelStore's constructor parameter for claritiy
* define client property before creating items from passed iterable to avoid the client property being undefined
* Fix fetching members with a limit
* add static Channel#create back and moved channel instantiating there
* make ChannelStore's constructor accept an iterable
* make iterable an optional parameter, allow to just pass client and options
* fixed a little typo in docs of <User>.displayAvatarURL() (#1872)
* Rewrite presence a little bit (#1853)
* such presence many good
* Update PresenceStore.js
* Update index.js
* Update ClientPresenceStore.js
* Update Presence.js
* Update ClientPresenceStore.js
* Update ClientUser.js
* Update Presence.js
* add timestamps and party
* Update Presence.js
* Update PresenceStore.js
* Update ClientPresenceStore.js
* Update ClientPresenceStore.js
* fix: made options.type optional in ClientUser#setActivity (#1875)
* fix: made options.type optional in ClientUser#setActivity
* some changes, smol fix
due to too many types being possible, it should just be defaulted to 0. this means streamers will have to set the type manually, though.
also mistake with activity.name check
* docs(Collection): Adjust exists documentation (#1876)
Since the return value of Collection#exists is basically just a boolean of Collection#find's result, the same documentation and arguments can and should be applied.
* refactor(Emoji): remove Guild#deleteEmoji in favour of Emoji#delete (#1877)
* refactor/fix(DataStores): move instantiating of store related classes into the relevant create methods and fixed FetchMemberOptions
* Renamed ChannelStore's constructor parameter for claritiy
* define client property before creating items from passed iterable to avoid the client property being undefined
* Fix fetching members with a limit
* add static Channel#create back and moved channel instantiating there
* make ChannelStore's constructor accept an iterable
* make iterable an optional parameter, allow to just pass client and options
* rebase, this time with saving the file
* address issue with falsy activity throwing errors when setting client's presence
* 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