-
-
Notifications
You must be signed in to change notification settings - Fork 84
Conversation
Can you merge #92 with this one? No need to make multiple PRs if you can merge them in one. If you need time to find all the bugs, let me know and I'll put a WIP label to this PR. |
Sure thing! I did multiple PRs since the changes are more-or-less unrelated :) |
No worries! Just trying to organize the PRs a little so they don't become a mess :) |
All right, these three changes are all I have for the time being :) I can squash them together if desired. |
Despite of nothing in JS being able to be private, but protected (by following the name conventions), we do use all these kinds of methods as |
Remaining typescript errors are (using
Dunno if they're worth fixing, since they're not based on a released discord.js version yet. (Also haven't yet figured out the last one regarding JSDoc 🤔 ) |
I've noticed these errors and stated this to Kyra... problem is the discord.js@master typings are for stable so the Discord.js errors are bound to happen until they're updated and the JSDoc I couldn't work out either. |
At the moment of writting the typings, only 11.2.0 typings were available, and I had to work with them (RichEmbed instead of EmbedMessage, and so on). If |
I've heard the Discord.js typings have been updated but I have not checked for myself |
Can you also allow edits from maintainers. This will not be merged if this branch is out-of-date with master, and without permission, I cannot automatically merge the branch to let CI re-run. |
@bdistin Enabled. |
Ok, I have been discussing protected vs private with some of the others. I pulled your branch and built docs. jsdocs#protected makes those methods show up on the docs site. I don't want them to be that public, however, I am fine with the typescript definitions to refer to them as protected so that you can properly extend them with TS. So, can we revert the jsdoc references to private, and we can keep the ts definitions as protected? |
`RichMenu#run()` returns the same type as `RichDisplay#run()`, which is a `Promise<ReactionHandler>`.
From the code, it seems like `RichDisplay#_determineEmojis()` has the four-argument signature, whereas `RichMenu#_determineEmojis()` has the two-argument signature. The typings have them mixed up, so this patch swaps the signatures to reflect the code.
Because `RichMenu` uses its parent's (`RichDisplay`) `_determineEmojis()` method, the method must be defined as protected.
EDIT: I'll do a last check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
RichMenu#run()
returns the same type asRichDisplay#run()
, which isa
Promise<ReactionHandler>
.