Commit Graph

4932 Commits

Author SHA1 Message Date
Papaia
9ffcd83027 docs(BitFields): remove string from BitFieldResolvable (#5122)
* refactor(BitFields): remove string from BitFieldResolvable

* docs(Client#generateInvite): fix indentation in example

* chore: resolve conflict

* refactor: revert breaking changes

Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2021-01-24 11:52:35 +01:00
Ishmaam Khan
5401b92aac refactor(GuildMember): remove GuildMember#hasPermission (#5152)
* refactor(GuildMember): remove GuildMember#hasPermission

* refactor(GuildEmoji): remove use for `GuildMember#hasPermission`

* typings: remove `GuildMember#hasPermission`
2021-01-24 11:50:58 +01:00
Kevin Novak
80e1afb654 types(RateLimitData): remove timeDifference property (#5208) 2021-01-24 11:49:26 +01:00
Alex
001676c7a9 feat(ShardingManager): Allow b-Eval/fetchClientValues on a specific shard when not all are ready (#5222)
Co-authored-by: BennyDiscord <46286597+BennyDiscord@users.noreply.github.com>
2021-01-24 11:49:15 +01:00
Jan
a33eed71af refactor(Util): remove convertToBuffer (#5237) 2021-01-24 11:48:03 +01:00
Carter
8bf76ffa52 chore: remove webpack from deploy workflow (#5253) 2021-01-24 11:47:20 +01:00
ckohen
f95f5dcd79 fix(GuildEmoji): check for cahnges to available in equals (#5201) 2021-01-22 19:18:06 +01:00
Shubham Parihar
0d5de4333d fix(VoiceConnection): make #dispatcher nullable (#5217) 2021-01-22 19:17:32 +01:00
monbrey
5ac3b57f9b feat(GuildChannel): support conversion between text and news (#5022)
* feat(GuildChannel): support conversion between text and news

* fix(Typings): add type to ChannelData

* fix(GuildChannel): use ChannelUpdate action handler to change class type

* Update src/structures/TextChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix(Typings): re-use ChannelType from GuildCreateChannelOptions

* fix(Typings): only allow text-news conversion

* fix(Typings): exclude -> pick (vlads suggestion)

* fix(Typings): pick -> exclude in two other spots

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-01-22 18:03:02 +01:00
Zaid
98b1c58218 fix(Message): update getters to take null permissions into account (#5066)
* fix(Message): update message#delete

* refactor(Message): message#deletable avoid duplicate call

* Update Message.js

* fix(message): resolve syntax errors

* chore(message): resolve linting issues (death to the gh web panel)

* Update Message.js

* death to the github web panel

* Update src/structures/Message.js

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2021-01-22 18:02:21 +01:00
izexi
eb28ee7905 fix(typings): return types for 'Webhook(Client)#send()' (#4876)
* feat(Typings): add 'APIRawMessage' interface

* fix(Typings): return type for WebhookFields#send()

* fix(Typings): types for APIRawMessage props

* refactor(Typings): exclude oauth props from API

* feat(Typings): add WebhookRawMessageResponse type

* refactor(Typings): use WebhookRawMessageResponse
2021-01-22 17:46:55 +01:00
Carter
c8ad52b89d chore: remove codeql job (#5231) 2021-01-22 17:45:40 +01:00
Souji
273e9557be feat(BitField): move problematic bit into the error message (#5228)
* feat(BitField): move problematic bit into the error message

* fix: remove intermediate constant
2021-01-22 17:44:50 +01:00
ElCholoGamer
764966e398 feat(ClientEvents): add tuple labels to event arguments (#5225) 2021-01-22 17:44:11 +01:00
Adrian Paschkowski
c4c817116f feat(GuildMember): #pending (#5121)
* Add GuildMember#isPending

* Rename is_pending to pending

* Improve jsdoc wording

* pending isn't nullable

* ??
2021-01-02 23:55:37 +01:00
Bread
e37160f4e3 fix(MessageEmbed): include author.name in length getter (#5167)
* fix(MessageEmbed): include `author.name` in length getter

* Update src/structures/MessageEmbed.js

Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>

* style: oxford comma

Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>

* refactor: es2020 syntax

Co-authored-by: Papaia <43409674+papaia@users.noreply.github.com>
2021-01-01 00:11:52 +01:00
Sugden
57b3ba425e chore: remove webpack from .*ignore files (#5171) 2021-01-01 00:10:56 +01:00
Mr¤KayJayDee
4e132f18c4 chore: bump LICENSE year (#5173) 2021-01-01 00:10:24 +01:00
Antonio Román
b0077dcd0c chore(Deps): remove setimmediate (#5159)
setimmediate is a browser polyfill, and since we do not support webpack anymore, there is no reason to keep it here.
2020-12-30 11:22:11 +01:00
Matt (IPv4) Cowley
8c2e6b70b8 refactor(Message): remove stored edit history (#5155) 2020-12-30 11:21:34 +01:00
ManEatingTapir
6a77453532 chore(RoleManager): change parameter of create to be one unnamed object (#5026)
* chore(RoleManager): change parameter of create to be one unnamed object

* chore(RoleManager): update src/managers/RoleManager.js

* chore(RoleManager): update typings/index.d.ts

* chore(RoleManager): update src/managers/RoleManager.js

Co-authored-by: Noel <buechler.noel@outlook.com>
2020-12-26 10:59:16 +01:00
ckohen
2aea7dd921 docs(MessageEditOptions): add the flags parameter (#5126) 2020-12-26 10:58:02 +01:00
Ishmaam Khan
2a0dcc5cae refactor: RoleManager (#5131)
* refactor(RoleManager): make use of `BaseManager#client`

* refactor(RoleManager): cool syntax

* refactor +1

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* refactor +2

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-12-26 10:57:34 +01:00
Jan
2c2249ee73 fix(Collection): toJSON() errors if the collection includes empty values (#5129) 2020-12-26 10:56:37 +01:00
dependabot[bot]
b19b8b593a chore(deps): bump node-notifier from 8.0.0 to 8.0.1 (#5145)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-26 10:54:50 +01:00
cherryblossom000
40d77bacc3 types: make Client#voice non-nullable (#5148)
Because of the removal of browser support (#5113) Client#voice is always non-nullable.
2020-12-26 10:54:15 +01:00
Zaid
b8be7237b8 Create CODE_OF_CONDUCT.md (#5120)
* Create CODE_OF_CONDUCT.md

* chore: move coc into .github/
2020-12-18 06:24:25 +01:00
Ishmaam Khan
ffe31405ff feat(GuildEmojiManager): implement GuildEmojiManager#fetch (#4933)
* feat: GuildEmojiManager#fetch

* typings: GuildEmojiManager#fetch
2020-12-14 21:44:15 +01:00
anandre
be0f383568 docs(RoleManager): fetch description (#4920)
* Update fetch description

The `fetch` method does not support fetching multiple IDs, so the description is currently inaccurate.

* Update src/managers/RoleManager.js

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
Co-authored-by: Noel <buechler.noel@outlook.com>
2020-12-14 14:12:36 +01:00
monbrey
b2a6720477 revert: 5047 (#5050) 2020-12-14 13:58:21 +01:00
Noel
0a591a9697 feat(Browser): remove browser � (#5113) 2020-12-14 13:56:16 +01:00
X-Classified
5c4547e84d docs(TextBasedChannel): indicate that replyTo cannot be system (#5115) 2020-12-14 13:54:51 +01:00
Souji
d6234b764e feat(Role): role tags (#4628)
* feat(Role): role tags

* fix(RoleManager): fix js docs and mark nullable

* fix(Role): typings tags are be null, not undefined

* fix(Role): getters should actually return a bool

* fix(RoleManager): typo

* fix(Role): should always return a boolean

* fix(Gmrm): getter should return null

* fix(RoleManager): getters should return null

* fix: typing getters should return null

* fix(Role): docs grammar and consistency

* chore: prefer in operator over Reflect#has

* feat(GmRm): botRole getter

* fix(GmRm): use the actual properties

* feat(RoleManager): rem myRole in pref o botRoleFor

* fix(Role): remove obsolete is- getters

* fix:  checking tags after getter removal

* chore: identifier naming consistency

* chore: prefer explicit true type over boolean

* fix: typo

* feat(Integration): Add Integration#roles getter (#1)

* fix(RoleManager): remove bot check r:partials

* feat(RoleManager): robustness against uncached u

* docs: possibly undefined

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2020-12-14 13:54:02 +01:00
Souji
8883a0144b fix: implement valueOf on pseudomanagers (#4595) 2020-12-14 13:52:21 +01:00
Jan
75e6dfbfd3 refactor(Message): remove options for Message#delete (#4999) 2020-12-14 13:52:04 +01:00
Advaith
41078997ae feat(APIMessage): remove disableMentions (#4836)
* chore: remove disableMentions

* style: fix eslint
2020-12-14 13:51:31 +01:00
Mirdukkk
9c7fe34c50 fix: add presence to ClientPresence from ClientOptions (#5041) 2020-12-13 03:14:23 +01:00
VoltrexMaster
9042d19c4e fix: filtering of string forms of null and undefined (#5075)
Removed null and undefined being filtered out in string forms which caused issues in `<client>.api`, issue: https://github.com/discordjs/discord.js/issues/5072
2020-12-13 03:13:52 +01:00
Awesome Stickz
12c909eecc fix(ChannelManager): Avoid crash in remove method with uncached channel (#4937)
* fix(ChannelManager): Avoid crash in remove method with uncached channel

* Use optional chaining

Co-authored-by: Ishmaam Khan <ishmaamk@gmail.com>

Co-authored-by: Ishmaam Khan <ishmaamk@gmail.com>
2020-12-12 22:40:50 +01:00
X-Classified
bb78120283 fix(Message): #system non-zero message types are not guaranteed to be system (#5108)
* fix(Message): #system not all nonzero message types are system

* feat(Message): introduce system message types

* refactor(Constants): change SystemMessageTypes to be exclusionary

* fix(Constants): only need to check if type exists

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>

* fix(Constants): lint

* fix(Typings): add SystemMessageTypees to Constants

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2020-12-12 22:40:39 +01:00
Jan
5b51392724 refactor(Client): improve generateInvite() (#5065)
* cleanup(Client): improve generateInvite()

* fix: you actually do need to fetch the application
2020-12-12 22:38:57 +01:00
dependabot[bot]
b6b3c6f29b chore(deps): bump ini from 1.3.5 to 1.3.8 (#5110)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-12 14:56:44 +01:00
Zaid
d70127cee6 feat(GuildMember): make GuildMember#setNickname first param nullable (#5070)
* Update index.d.ts

* Update GuildMember.js

* Update src/structures/GuildMember.js

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>

* Update GuildMember.js

* Update index.d.ts

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
2020-12-12 14:50:33 +01:00
anandre
77d42373a1 docs: permission overwrite methods descriptions (#5079)
* Change permission overwrite methods descriptions

The methods `GuildChannel#updateOverwrite` and `#createOverwrite` had some awkward wording in the description: `. (...)` does not look good.  This PR cleans up the descriptions to be one sentence that's clearer in meaning.  There's also changes to make `permission overwrite/s` consistent - some lines had `permissions overwrite/s`.

* Update src/structures/GuildChannel.js

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>

* Update src/structures/GuildChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* Update src/structures/GuildChannel.js

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-12-12 14:50:04 +01:00
Jan
bb04e69a92 cleanup(Guild): remove Guild#voice (#5091) 2020-12-12 14:49:32 +01:00
SpaceEEC
b509862bfa fix(UserFlags): correct early bot dev name, remove deprecated aliases (#5104) 2020-12-12 14:48:03 +01:00
Advaith
2685b960d7 docs(Client): #emojis is a BaseGuildEmojiManager (#5048) 2020-12-08 22:07:06 +01:00
monbrey
60e5a0e46f feat(Message|TextChannel): Inline replies (#4874)
* feat(Message): remove reply functionality

* feat(InlineReplies): add INLINE_REPLY constant/typing

* feat(InlineReplies): add Message#replyReference property

* feat(InlineReplies): add typings for sending inline replies

* feat(InlineReplies): provide support for inline-replying to messages

* feat(Message): add referencedMessage getter

* fix: check that Message#reference is defined in referencedMessage

* refactor(InlineReplies): rename property, rework Message resolution

* docs: update jsdoc for inline replies

* feat(Message): inline reply method

* fix(ApiMessage): finish renaming replyTo

* fix: jsdocs for Message#referencedMessage

Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>

* fix: restore reply typings

* fix: dont pass channel_id to API when replying

* chore: update jsdocs

* chore: more jsdoc updates

* feat(AllowedMentions): add typings for replied_user

* fix: naming conventions

* fix(Message): referenced_message is null, not undefined

* fix(MessageMentionOptions): repliedUser should be optional

* chore: get this back to the right state

* fix(ApiMessage): pass allowed_mentions when replying without content

* fix(ApiMessage): prevent mutation of client options

Co-authored-by: almostSouji <timoqueezle@gmail.com>
Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
2020-12-08 21:08:26 +01:00
SpaceEEC
7365f40300 fix(Collector): throw an error if a non-function was provided as filter (#5034) 2020-12-08 20:11:44 +01:00
Carter
09d07553ab docs(User): fix typos in jsdoc (#5060) 2020-12-06 18:03:39 +01:00