Last active
August 16, 2021 14:02
-
-
Save headStyleColorRed/2d90b56da084e32eb0592b7fa5b91dfa to your computer and use it in GitHub Desktop.
MEDIUM Missing telegram server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modules | |
const MichaelBot = require("./botLogic.js") | |
[. . . ] | |
// ++++++++++++++++ HTTP METHODS +++++++++++++++++++ // | |
[. . . ] | |
app.post("/send_message", async (req, res) => { | |
let body = req.body | |
if (!body.message || !body.botId || !body.chatId) { | |
return res.send("Error: All fields are required") | |
} | |
let result = MichaelBot.sendMessage(body.message, body.botId, body.chatId) | |
res.send(result) | |
}) | |
[. . . ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment