It is repository for chat bot: BBcurrencyQuoteBot
🎉 Powered by - Bots.Business
This repository can be imported to Bots.Business as a worked chat bot.
Bots.Business - it is probably the first CBPaaS - Chat Bot Platform as a Service.
A CBPaaS is a cloud-based platform that enables developers to create chatbots without needing to build backend infrastructure.
How to create bot?
- Create bot with @BotFather and take Secret Token
- Create bot in App and add Secret Token
- Add Public Key from App as Deploy key with read access (and write access for bot exporting if you need it)
- Do import for this git repo
Now you can talk with yours new Telegram Bot
See more
File name - it is command name (Bot it can be rewritten in command description)
Command can have: name
, help
, aliases
(second names), answer
, keyboard
, scnarios
(for simple logic) and other options.
It is file header:
/*CMD
command: /test
help: this is help for ccommand
need_reply: [ true or false here ]
auto_retry_time: [ time in sec ]
answer: it is example answer for /test command
keyboard: button1, button2
aliases: /test2, /test3
CMD*/
See more
It is command code in JavaScript. Use Bot Java Script for logic in command.
For example:
Bot.sendMessage(2+2);
See more
You can store common code in the libs folder. File name - it is library name.
For example code in myLib.js:
function hello(){ Bot.sendMessage("Hello from lib!") }
function goodbye(name){ Bot.sendMessage("Goodbye, " + name) }
publish({
sayHello: hello,
sayGoodbyeTo: goodbye
})
then you can run in any bot's command:
Libs.myLib.hello()
Libs.myLib.sayGoodbyeTo("Alice")
See more
See other bots examples in the github or in the Bot Store
See API
This bot involved the usage of currencyQuote inbuilt Lib, So you don't need to install any extra lib in this bot.
Read More About CurrencyQuote
You can use this bot to get Crypto/Currencies prices, you can convert a Currency to INR and USD Prices,
Live Price: @botusername BTC INR
Conversion: @botusername convert 1 BTC INR
Yes! you got it right! it can be used in inline mode! You can use this bot for live-time currency prices!
• We have: CurrencyQuote lib explained how to use
• Idea of Using catch and try functions in different way
• Introduction in complete for inline queries and much more
Import the bot to your Account > Enable inline mode from botfather > Launch bot > that's it! Main Setup: