Hello,
I recently started using the library and wanted to use the button interaction API but when I wanted to handle the button I got an error:
Unhandled exception:
type 'Null' is not a subtype of type 'String'
#0 new ButtonInteraction.from (package:mineral/src/api/interactions/button_interaction.dart:37:14)
#1 InteractionCreate._executeButtonInteraction (package:mineral/src/internal/websockets/packets/interaction_create.dart:141:61)
<asynchronous suspension>
So to address this issue I think that we should just change this constructor from
return ButtonInteraction(
payload['id'],
payload['application_id'],
payload['version'],
payload['type'],
payload['token'],
payload['member']?['user']?['id'],
payload['guild_id'],
payload['message_id'],
payload['data']['custom_id'],
payload['channel_id'],
);
to
return ButtonInteraction(
payload['id'],
payload['application_id'],
payload['version'],
payload['type'],
payload['token'],
payload['member']?['user']?['id'],
payload['guild_id'],
payload['id'],
payload['data']['custom_id'],
payload['channel_id'],
);
bug help wanted