This is a simple music artist search bot for Telegram.
npm install
Register yourself a bot @BotFather and copy the API key.
Next, register yourself a last.fm app: https://www.last.fm/api/account/create and copy the API key.
Add both keys into a file called token.js
:
module.exports = {
botToken: 'TELEGRAM-TOLEN',
lastfmToken: 'LAST-FM-TOKEN'
};
Then run the bot:
node index.js
The bot can be used as inline bot like this:
In any chat just write @yourBotName bandName
. This will trigger an inline query.
On the other hand, you can chat with the bot directly. Use the command /artist artistName
to fetch artist details.
node-telegram-bot-api: https://github.com/yagop/node-telegram-bot-api
About Telegram bots: https://core.telegram.org/bots
Bot API manual: https://core.telegram.org/bots/api