Commit Graph

4142 Commits

Author SHA1 Message Date
NotSugden
02aee9b06d style: alphabetically organize imports 2020-02-27 19:35:36 +00:00
NotSugden
e0a742969d fix indent 2020-02-27 17:04:05 +00:00
NotSugden
d1bdd0e54b oops 2020-02-26 23:12:23 +00:00
NotSugden
0080f5dbc7 style: order typings alphabetically 2020-02-26 23:06:54 +00:00
NotSugden
2a36dff43a refactor: use EventEmitter.off in favour of EventEmitter.removeListener 2020-02-26 20:38:26 +00:00
NotSugden
9953b4d267 refactor: destructure EventEmitter from events 2020-02-26 19:38:46 +00:00
NotSugden
930d7751ab refactor: destructure EventEmitter 2020-02-26 19:24:33 +00:00
NotSugden
cc4b72af6c fix(VoiceWebSocket): use client.clearInterval in favour of clearInterval 2020-02-26 19:22:35 +00:00
NotSugden
69d022cb3a refactor(VoiceWebSocket): use connection.client in favour of connection.voiceManager.client 2020-02-26 19:20:38 +00:00
NotSugden
485a6430a8 fix(StreamDispatcher): only listen to finish event once 2020-02-26 18:49:32 +00:00
NotSugden
6ef404c873 cleanup(StreamDispatcher): remove old 'end' event 2020-02-26 18:42:25 +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