TamTam Echo Bot Web Hook

node v10.24.1
version: 1.0.0
endpointsharetweet
Provide bot access token to your enviroment variables as TAMTAM_API_TOKEN or insert it to the code
require('axios'); const endpoint = require("@runkit/runkit/json-endpoint/1.0.0"); const { createAPI } = require('tamtam-bot-api'); const api = createAPI(/* TAMTAM_API_TOKEN */); endpoint(exports, async function(data) { const update = data.body; if (update.update_type === 'message_created') { const { body, sender } = update.message; return await api.sendMessage({ text: body.text }, { user_id: sender.user_id }); } });
Loading…

no comments

    sign in to comment