I
I
Igor2020-06-17 03:52:25
Bots
Igor, 2020-06-17 03:52:25

Who managed to connect Microsoft bot framework to Telegram outside of Azure?

Colleagues, I’ve been using Microsoft bot framework bots for several days.

As I understand it, everything is tailored for Azure , well, at least out of the box, you can’t connect telegrams outside of Azure.
I could be wrong, but what if there is an adapter for Telegram o_O. (yes, there is some kind of half-dead non-working one)

We don’t want to use Azure , it’s painfully expensive, in principle the most expensive cloud service.

Some code

Here is the simplest implementation
Some listener, waiting for a well-defined message format

// Create adapter.
// See https://aka.ms/about-bot-adapter to learn more about adapters.
const adapter = new BotFrameworkAdapter({
    appId: process.env.MicrosoftAppId,
    appPassword: process.env.MicrosoftAppPassword
});

const bot = new CustomPromptBot(conversationState, userState);

// Listen for incoming requests.
server.post('/api/messages', (req, res) => {
    adapter.processActivity(req, res, async (context) => {
        // Route to main dialog.
        await bot.run(context);
    });
});


Actually the question is, who has an example of a bot solution on the Microsoft bot framework outside of cloud services?
I plan to run the bot in docker in my cloud, which is almost free.

Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question