Bot development with Microsoft Bot Framework
You can develop bots using the Microsoft Bot Framework. Below it's a small example on how to do that using our adapter:
import {TelepadoAdapter} from 'telepado-bot';
import BankBot from './BankBot';
import OrganizationClient from '../../src/client/OrganizationClient';
import Connection from '../../src/client/Connection';
async function run() {
const connection = new Connection({
username: 'bank_bot',
server: 'prod-api.meetora.im',
port: 9933,
token: 'xxxxxx'
});
const organizationClient = new OrganizationClient({
organizationId: 1,
connection
});
const adapter = new TelepadoAdapter({
organizationClient
});
adapter.onTurnError = async (context, error) => {
console.log(context, error);
};
const bot = new BankBot();
adapter.onUpdate((context) => bot.run(context), {
onButtonClicked(update, context) {
return bot.onButtonClicked(update, context);
}
});
}
run().catch((reason) => {
console.error(reason);
});More information can be found on their official website.
Last updated
