Skip to content

cwoelk/tg-test-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Telegram Bot Experiment

Very simple test bot using the Telegram Api through the npm package node-telegram-bot-api. It also shows the use of the new inline feature.

Create a bot

Log into Telegram and create your bot talking to the @BotFather bot.

BotFather: They call me the Botfather, I can help you create and set up Telegram
bots. Please read this manual before we begin:
https://core.telegram.org/bots

You can control me by sending these commands:

/newbot - create a new bot
/token - generate authorization token
/revoke - revoke bot access token
/setname - change a bot's name
/setdescription - change bot description
/setabouttext - change bot about info
/setuserpic - change bot profile photo
/setinline - change inline settings
/setinlinefeedback - change inline feedback settings
/setcommands - change bot commands list
/setjoingroups - can your bot be added to groups?
/setprivacy - what messages does your bot see in groups?
/deletebot - delete a bot
/cancel - cancel the current operation

> /newbot

It will generate your bot api token for you. Furthermore you should enable the inline mode with the /setinline command.

Run the code

After npm install run the following replacing your <<<YOUR_API_TOKEN>>> with the one you received from your chat with the @BotFather.

API_TOKEN='<<<YOUR_API_TOKEN>>>' DEBUG=tgbot* npm start

About

A very simple TG test bot to play around with

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published