How to use the messaging-api-line.Line.createText function in messaging-api-line

To help you get started, we’ve selected a few messaging-api-line examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Yoctol / bottender / packages / bottender / src / line / LineContext.ts View on Github external
sendText(text: string, options?: LineTypes.MessageOptions) {
    return this.send([Line.createText(text, options)], options);
  }
github Yoctol / messaging-apis / examples / line / server.js View on Github external
const handleEvent = event => {
  const { type, replyToken, message } = event;
  const messageType = message.type;
  if (type !== 'message' || messageType !== 'text') {
    return Promise.resolve(null);
  }
  if (verifyEvents.includes(replyToken)) return Promise.resolve(null);
  return client.reply(replyToken, [
    Line.createText('Hello'),
    Line.createImage(imageUrl),
    Line.createText('End'),
  ]);
};
github Yoctol / bottender / packages / bottender / src / line / LineContext.ts View on Github external
pushText(text: string, options?: LineTypes.MessageOptions) {
    return this.push([Line.createText(text, options)], options);
  }
github Yoctol / messaging-apis / examples / line / server.js View on Github external
const handleEvent = event => {
  const { type, replyToken, message } = event;
  const messageType = message.type;
  if (type !== 'message' || messageType !== 'text') {
    return Promise.resolve(null);
  }
  if (verifyEvents.includes(replyToken)) return Promise.resolve(null);
  return client.reply(replyToken, [
    Line.createText('Hello'),
    Line.createImage(imageUrl),
    Line.createText('End'),
  ]);
};
github Yoctol / bottender / packages / bottender / src / line / LineContext.ts View on Github external
replyText(text: string, options?: LineTypes.MessageOptions) {
    return this.reply([Line.createText(text, options)], options);
  }