Commit Graph

4142 Commits

Author SHA1 Message Date
Sugden
e4f567c65e refactor(GuildChannel): change overwritePermisions to accept an… (#3853)
* refactor(GuildChannel): change overwritePermisions to no longer accept an object

* fix: check for instanceof Collection too
2020-02-29 14:19:21 +01:00
Sugden
f95df6f7d7 fix(Shard): cleanup after settling spawn promise (#3799)
* clear sharding ready timeout

* fix oops

* update typings

* commited to the wrong branch

* fix(Shard): cleanup after settling the spawn promise

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-29 14:18: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
3d0c1df19d refactor(Guild)/fix(Util): use resolveID and regex for cleanCod… (#3837)
* refactor(Guild): use resolveID instead of resolve(...).id

* fix(Util): use regex for cleanCodeBlockContent
2020-02-28 18:26:37 +01:00
Sugden
1af1e0cbb8 refactor: add some more consistency (#3842)
* cleanup(StreamDispatcher): remove old 'end' event

* fix(StreamDispatcher): only listen to finish event once

* refactor(VoiceWebSocket): use `connection.client` in favour of `connection.voiceManager.client`

* fix(VoiceWebSocket): use `client.clearInterval` in favour of `clearInterval`

* refactor: destructure EventEmitter

* refactor: destructure EventEmitter from events

* refactor: use EventEmitter.off in favour of EventEmitter.removeListener

* style: order typings alphabetically

* oops

* fix indent

* style: alphabetically organize imports

* style: remove extra line

* Revert "style: remove extra line"

This reverts commit 96e182ed69.

* Revert "style: alphabetically organize imports"

This reverts commit 02aee9b06d.

* Revert "refactor: destructure EventEmitter from events"

This reverts commit 9953b4d267.

* Revert "refactor: destructure EventEmitter"

This reverts commit 930d7751ab.

* Revert "fix(StreamDispatcher): only listen to finish event once"

This reverts commit 485a6430a8.

* refactor: use .removeListener instead of .off
2020-02-28 18:02:51 +01:00
Souji
df88729c44 feat(MessageEmbed): re-introduce MessageEmbed#addField (#3850)
* feat(MessageEmbed): re-introduce MessageEmbed#addField

* suggestion: sorting alphabetically

* suggestion: document inline to default false for #addField
2020-02-28 17:58:52 +01:00
Crawl
261816dcf8 chore(githooks): commitlint (#3836) 2020-02-28 17:43:45 +01:00
Sugden
31a3a86ebc docs(MessageEmbed): document article embed type (#3846) 2020-02-28 17:43:11 +01:00
Sugden
6109669c97 typings(WebhookClient): client is not a client (#3838) 2020-02-28 17:41:12 +01:00
Amish Shah
653784b564 chore(StreamDispatcher): remove end event
use finish event instead
2020-02-26 20:00:48 +00:00
Timo
9cb306c823 feat: replace disableEveryone with disableMentions (#3830)
* 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
2020-02-26 11:13:23 +00:00
Crawl
c4bda746c8 chore(githooks): husky (#3835) 2020-02-24 23:32:12 +01:00
Crawl
3a0470b45c chore(deps): update deps and fix lint (#3833) 2020-02-24 23:14:31 +01:00
Crawl
c1d396a6c4 Partial-revert "typings(WebhookClient): client is not a Client" (#3831)
* Revert "typings(WebhookClient): client is not a Client (#3829)"

This reverts commit 44ff67dc11.

* Update index.d.ts

* Update index.d.ts
2020-02-24 22:44:46 +01:00
Sugden
44ff67dc11 typings(WebhookClient): client is not a Client (#3829)
* typings(WebhookClient): client is not a Client

* style: use tabs
2020-02-24 22:01:41 +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
02807347e7 fix: Client#sweepMessages should throw an INVALID_TYPE error (#3828)
* fix(Client): sweepMessages shouldn't shrow an invalid client option error

* style: trailing commas
2020-02-24 18:27:15 +01:00
BorgerKing
52c0a4067b fix(MessageEmbed): various typos and fixes (#3819)
* fix: typo

* fix: couple more typos

* fix: grammar stuff

* fix: EmbedField takes StringResolvable not string

* Revert "fix: EmbedField takes StringResolvable not string"

This reverts commit c1bdd78ad3.

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-24 18:21:29 +01:00
matthewfripp
acf724e691 feat(Collector): Addition of resetTimer() (#3825)
* feat(Collector): Addition of resetTimer()

* typings
2020-02-24 18:17:24 +01:00
SpaceEEC
a69ebbe9d9 feat/fix(GuildAuditLogs): handle new event types (#3602)
* feat/fix(GuildAuditLogs): handle new event types

* fix(GuildAuditLogsEntry): coerce to numbers, simplify extra for deleted entities

* fix(GuildAuditLogsEntry): do not revert 'type' extra
2020-02-24 18:16:20 +01:00
Sugden
0a1b9a5285 refactor: remove unused error in catch statements (#3820)
* refactor(handlers): remove unused error in catch

* refactor(PacketHandler): remove unused error

* refactor(SecretBox): remove unused error

* refactor(ClientPresence): remove unused error

* style: remove space

Co-Authored-By: Crawl <icrawltogo@gmail.com>

Co-authored-by: Crawl <icrawltogo@gmail.com>
2020-02-24 18:15:38 +01:00
Crawl
98a552107e tooling(typings): new linter for typings (#3827) 2020-02-24 17:56:44 +01:00
Crawl
e6d22527bb chore(typings): semicolon consistency (#3826) 2020-02-24 17:22:16 +01:00
Souji
54f24d1fea typings(MessageEmebd): fix typings for addFields (#3821)
* typings(MessageEmebd): fix typings for addFields

* fix: add missing semicolon

* docs(MessageEmbed): fix various types

* in accordance with the scope of the PR

* Update src/structures/MessageEmbed.js

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

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 14:02:06 +01:00
Sugden
967b533e9d typings(MessageEmbed): properly mark properties (#3822)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 13:06:22 +01:00
Sugden
25cd23e305 cleanup(DMChannel): remove _cacheMessage (#3824)
* cleanup(DMChannel): remove _cacheMessage

* update actions/checkout to v2

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 13:06:00 +01:00
SpaceEEC
d406f42ce0 docs/typings(SystemChannelFlags): properly document and use resolvable (#3794)
- Change GuildEditData#systemChannelFlags to use SystemChannelFlagsResolvable
- Move SystemChannelFlagsResolvable outside of class definition to make the docs generator happy
2020-02-24 13:03:45 +01:00
SpaceEEC
ccb83a71ee docs/typings(MessageAttachment): mark spoiler as readonly, order spoiler in typings (#3714) 2020-02-24 13:03:02 +01:00
Tenpi
e57ef25082 typings/fix(MessageEmbed): add interfaces for props, fix copy constructor (#3492)
* updated typings

* Updated docs

* fixed types for MessageEmbedOptions

* added curly bracket spaces

* fix(MessageEmbed): make copy constructor work properly

* fix(MessageEmbed): copy the provider too

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-24 11:44:54 +01:00
Sugden
28490e84b0 typings(Invite): channel can be a PartialGroupDMChannel (#3823) 2020-02-24 10:41:29 +01:00
SpaceEEC
4ec01ddef5 feat(MessageEmbed): change toJSON method to return an api-compatible object (#3813) 2020-02-23 20:42:47 +01:00
Souji
b727f6c1b9 feat: bring embed builder field manipulation in line with underlying array functionality (#3761)
* feat: splice multiple fields

* remove MessageEmbed#spliceField
* add MessageEmbed#spliceFields
* to behave more like Array#splice
* and allow multiple fields to be replaced/inserted
* update typings accordingly

* refactor: rename check to normalize

* check suggests boolean return type

* feat: allow spread args or array as field input

* rewrite: replace addField in favor of addFields

* typings: account for changes

* chore: bump min node to 11.0.0

* for Array#flat

* fix: bump min-node in package engines field

* remove addBlankField
2020-02-23 20:41:48 +01:00
Sugden
ecd8cccddf typings(AddGuildMemberOptions): change accessToken from String to string (#3815) 2020-02-23 09:16:20 +01:00
iBisho
b347e9ec26 refactor(MessageEmbed): simplify initialization of files property (#3814) 2020-02-22 22:36:29 +01:00
Sugden
161f90761a feat(PartialGroupDMChannel): to support Invite#channel for group dms (#3786)
* add PartialGroupDMChannel class

* fix lint

* add new errors

* add new class to Channel.create

* fix lint

* update typings accordingly

* better implement errors

* remove unnecessary functions

* oops

* lint

* lint

* lint

* more lint

* more lint

* jsdoc typo

* suggested changes

* i did not forget the typings
2020-02-22 13:25:27 +01:00
Sugden
bea6da621d feat(Guild): add rulesChannel and publicUpdatesChannel (#3810)
* add rulesChannel* & publicUpdatesChannel*

* update typings
2020-02-22 13:04:41 +01:00
Sugden
ef8acecc70 feat: add new MessageTypes (14 and 15) (#3812)
* document types

* typings

* move comment
2020-02-22 12:31:51 +01:00
Souji
f6075a6e3a typings(Constants): add VerificationLevels (#3811) 2020-02-21 21:48:08 +01:00
Sugden
f85230812f typings(Guild): mark afkChannel* & applicationID as nullable (#3805) 2020-02-19 21:34:26 +01:00
Sugden
c4c6ad4a63 docs/typings(WSEvents): add missing, remove duplicated and userbot events (#3800)
- Added `MESSAGE_REACTION_REMOVE_ALL`
- Remove duplicated `VOICE_STATE_UPDATE`
- Remove userbot `USER_SETTINGS_UPDATE`
2020-02-17 14:15:59 +01:00
Vlad Frangu
e4e977f447 src: update client options and shards value if fetching shard count (#3787)
* src: Update client options and shards value if fetching shard count

* src: Fix bug and remove more dead code
2020-02-16 19:41:37 +01:00
Vlad Frangu
46ee06b424 feat(Message): add support for flag editing / embed suppression (#3674) 2020-02-16 19:36:10 +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
Vlad Frangu
21d37ed0cc docs: clarify what zlib-sync does (#3785)
* docs: Clarify what zlib-sync does

* docs: Update docs site welcome

* src/docs: Remove `ws.compress` from docs

This is a deprecated parameter and you shouldn't use it unless you have zlib-sync installed, and even then, compression is automatically enabled

* docs: Apply suggestion

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

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-02-13 22:48:36 +01:00
Sugden
6770c7c786 typings: add invite events to WSEventType and constants (#3782)
* fix event typings

* add ws events to jsdoc
2020-02-13 22:46:46 +01:00
Ryan Munro
a36f3869b3 fix(Message): handle undefined/null content in cleanContent getter (#3778)
* Handle undefined/null content in Message#cleanContent

* Typings

* Update typings/index.d.ts

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

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-02-12 23:07:34 +01:00
Sugden
878cc050d4 fix(Guild): use snake case when editing system_channel_flags (#3781) 2020-02-12 22:47:24 +01:00
Sugden
562b5bfca7 refactor(VoiceChannel): use Permissions.FLAGS in speakable (#3780) 2020-02-12 22:42:43 +01:00
Sugden
d43692b0f2 docs(Guild): channels is a manager of channels (#3779) 2020-02-12 22:29:16 +01:00