-
Notifications
You must be signed in to change notification settings - Fork 239
Conversation
With TypeScript, this does not really work well. Especially due to missing events where you removed most of them. |
the removed events are inherited from the discord.js |
When I tried it, I did not have any type-hinting for events. |
this could be being caused by line 201, ill test this at some point and see edit: i remember something a while back about the generic |
I get type-hinting for the events listed there, for example, |
@ShawnCZek fixed |
Hey team I'm still getting errors at compile time using the latest discord.js package which seem to relate to this:
Anyone got any ideas? |
I can confirm the latest Commando master works with discord.js 12.2.0, but not with the latest discord.js master |
This would be because discord.js master has switched to using discords new inline replies which will require similar changes to Commando |
I haven't figured out what the most recent compatible version of discord.js is yet, I'll keep checking. |
Looks like Commando works up to discord.js 12.3.1, but isn't compatible with 12.4.0 onwards. |
If someone more knowledgeable about TypeScript would like to tackle this, feel free. My knowledge of it is zilch. |
Can you somehow unmerge this or something, its impossible to write a command in typescript properly. None of my old bots work and I have had to rollback to an oudated version so they would run. Please. |
And the issue that comes from this PR is...? |
why revert it when you can fix it |
This PR improves certian typings within the library, such as each client event not needing to be documented, as its inherited from the discord.js
Client
class, and changing theCommandoMessage
class to extend the discord.jsMessage
class to match what is actually exported.i got the impression i did something funky with making methods such as
CommandoMessage#reply
beingCommandoMessage['say']
, they seem to accept the same options so it seemed silly to just copy paste the same types for each of those functionsedit: new typings haven't been tested in typescript yet, as i haven't had time to do it extensively, but if someone would like to test them you're welcome to