MCPcopy Create free account
hub / github.com/botmasterai/botmaster / sendTextMessageTo

Method sendTextMessageTo

lib/base_bot.js:376–385  ·  view source on GitHub ↗

* sendTextMessageTo() Just makes it easier to send a text message with * minimal structure. * @param {string} text * @param {string} recipientId a string representing the id of the user to * whom you want to send the message. * @param {object} [sendOptions] see `sendOptions` for `send

(text, recipientId, sendOptions)

Source from the content-addressed store, hash-verified

374 * bot.sendTextMessageTo('something super important', update.sender.id);
375 */
376 sendTextMessageTo(text, recipientId, sendOptions) {
377 if (!get(this, 'sends.text')) {
378 return Promise.reject(new SendMessageTypeError(this.type, 'text'));
379 }
380 const outgoingMessage = this.createOutgoingMessage()
381 .addRecipientById(recipientId)
382 .addText(text);
383
384 return this.sendMessage(outgoingMessage, sendOptions);
385 }
386
387 /**
388 * reply() Another way to easily send a text message. In this case,

Callers 1

replyMethod · 0.95

Calls 4

createOutgoingMessageMethod · 0.95
sendMessageMethod · 0.95
addTextMethod · 0.80
addRecipientByIdMethod · 0.80

Tested by

no test coverage detected