replySendMessage method
Future<List<MessageModel> >
replySendMessage({
- String? message,
- int? randomId,
- String? domain,
- int? guid,
- int? lat,
- int? long,
- List? attachment,
- List<
int> ? forwardMessages, - int? stickerId,
- VkDartKeyboard? keyboard,
- Map<
String, dynamic> ? template, - String? payload,
- Map<
String, dynamic> ? contentSource, - bool? dontParseLinks,
- bool? disableMentions,
- String? intent,
- int? subscribeId,
Responds to a message in the dialog from which the event came. More detailed documentation: sendMessage
Sample example:
vkdart
.onMessage()
.where((event) => event.isInbox)
.listen((event) => event.replySendMessage(message: 'Hello, @id${event.senderId!}'));
Implementation
Future<List<MessageModel>> replySendMessage(
{String? message,
int? randomId,
String? domain,
int? guid,
int? lat,
int? long,
List<dynamic>? attachment,
List<int>? forwardMessages,
int? stickerId,
VkDartKeyboard? keyboard,
Map<String, dynamic>? template,
String? payload,
Map<String, dynamic>? contentSource,
bool? dontParseLinks,
bool? disableMentions,
String? intent,
int? subscribeId}) {
final forwardOptions = {
'peer_id': peerId,
'is_reply': true,
if (conversationMessageId != null)
'conversation_message_ids': conversationMessageId
else
'message_ids': id
};
return sendMessage(
message: message,
randomId: randomId,
domain: domain,
guid: guid,
lat: lat,
long: long,
attachment: attachment,
forward: forwardOptions,
stickerId: stickerId,
keyboard: keyboard,
template: template,
payload: payload,
contentSource: contentSource,
dontParseLinks: dontParseLinks,
disableMentions: disableMentions,
intent: intent,
subscribeId: subscribeId,
);
}