Please describe the problem you are having in as much detail as possible:
When using Client.fetchInvite to fetch metadata about a Group DM Invite code, the returned Invite object has the channel property set to null, even though the API returns a partial DM Group Channel object.
Additionally, DJS will emit the debug event Failed to find guild, or unknown type for channel <channel ID> 3.
This is probably because DJS doesn't support Group DMs anymore in v12 and as such it doesn't know how to resolve the channel type 3.
Currently the documentation for the Invite object states that channel is a non-nullable property, which appears to be wrong in the case of Group Invites. If this is intended behavior the docuentation and typings should be adjusted to reflect that channel might be null.
However I've also asked on the Support Server and we came to the conclusion that it would be nice to have a partial channel object for Group Invites; after all the channel data is included in the API response (relevant message link).
Reproduction steps:
Generate an invite link to a Group DM
Use fetchInvite to... fetch it
See that the returned Invite object has channel: null
Further details:
discord.js version: v12 on master as of 6cd4c27faed8b3f1b9da41a87b7922cd286313b9
Node.js version: v10.12.0
Priority this issue should have – please be realistic and elaborate if possible: Low
[x] I have also tested the issue on latest master, commit hash: 6cd4c27faed8b3f1b9da41a87b7922cd286313b9
Please describe the problem you are having in as much detail as possible:
When using
Client.fetchInvite
to fetch metadata about a Group DM Invite code, the returned Invite object has thechannel
property set tonull
, even though the API returns a partial DM Group Channel object. Additionally, DJS will emit the debug eventFailed to find guild, or unknown type for channel <channel ID> 3
. This is probably because DJS doesn't support Group DMs anymore in v12 and as such it doesn't know how to resolve the channel type 3.Currently the documentation for the
Invite
object states thatchannel
is a non-nullable property, which appears to be wrong in the case of Group Invites. If this is intended behavior the docuentation and typings should be adjusted to reflect thatchannel
might be null. However I've also asked on the Support Server and we came to the conclusion that it would be nice to have a partial channel object for Group Invites; after all the channel data is included in the API response (relevant message link).Reproduction steps:
fetchInvite
to... fetch itchannel: null
Further details:
discord.js version: v12 on master as of 6cd4c27faed8b3f1b9da41a87b7922cd286313b9
Node.js version: v10.12.0
Priority this issue should have – please be realistic and elaborate if possible: Low
[x] I have also tested the issue on latest master, commit hash: 6cd4c27faed8b3f1b9da41a87b7922cd286313b9