All checks were successful
Build and push Doorman UI / API / docker (push) Successful in 1m27s
16 lines
412 B
JavaScript
16 lines
412 B
JavaScript
exports.handler = async function(context, event, callback) {
|
|
const response = new Twilio.Response();
|
|
|
|
const discordPath = Runtime.getFunctions()['common/discord'].path;
|
|
const discord = require(discordPath);
|
|
|
|
// user must be in "Doorman" server
|
|
await discord.sendMessageToUser(context,
|
|
event.discordUser,
|
|
event.msg,
|
|
)
|
|
.catch((e) => console.error(e));
|
|
|
|
return callback(null, response);
|
|
};
|