Ref : https://core.telegram.org/bots#6-botfather
Send Message
button, then your telegram will be opened in your phone or your PC which Telegram
is already installed on. Meet BotFather
./newbot
, give a name
to the bot created, give an username
. username
should end with bot
. (e.g. MyMagicMirrorBot
or mystupidslave-bot
... )110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw
. Remember that.BotFather
. You can find your bot and change chat room of your Bot. Type anything, but your bot will not react yet.cd ~/MagicMirror/modules
git clone https://github.com/bugsounet/EXT-TelegramBot.git
cd EXT-TelegramBot
npm install
config.js
of MagicMirror
, add these;{
module: 'EXT-TelegramBot',
position: 'top_center',
config: {
telegramAPIKey : '<your Telegram API Token>',
allowedUser : ['<your Telegram username without @>'], // This is NOT the username of bot.
}
},
MagicMirror
./help
or /commands
. Your bot will react!/mychatid
. This command will show the id of this chat room. The chat id
looks like 12345678
. Remember that. We will use this id for admin.config.js
again.{
module: 'EXT-TelegramBot',
position: 'top_center',
config: {
telegramAPIKey : '<your Telegram API Token>',
allowedUser : ['<your Telegram username without @>'],
adminChatId : <your admin chat id>,
}
},
MagicMirror
.