fromMap static method
Future<PrivateSelectContext>
fromMap(
- MarshallerContract marshaller,
- DataStoreContract datastore,
- Map<
String, dynamic> payload
Implementation
static Future<PrivateSelectContext> fromMap(MarshallerContract marshaller,
DataStoreContract datastore, Map<String, dynamic> payload) async {
return PrivateSelectContext(
customId: payload['data']['custom_id'],
id: Snowflake(payload['id']),
applicationId: Snowflake(payload['application_id']),
token: payload['token'],
version: payload['version'],
message: await datastore.message.getPrivateMessage(
messageId: Snowflake(payload['message']['id']),
channelId: Snowflake(payload['channel_id']),
),
user: await marshaller.serializers.user.serialize(payload['user']),
);
}