aboutsummaryrefslogtreecommitdiff
path: root/src/bot_telegram.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bot_telegram.js')
-rw-r--r--src/bot_telegram.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bot_telegram.js b/src/bot_telegram.js
new file mode 100644
index 0000000..3ca14c3
--- /dev/null
+++ b/src/bot_telegram.js
@@ -0,0 +1,20 @@
+/*********************************************
+ *
+ * AleeBot for Alee's Lounge telegram chat
+ * Copyright (C) 2017 AleeCorp
+ * License: MIT
+ *
+ **********************************************/
+ const TelegramBot = require('node-telegram-bot-api');
+ const abVersion = ('1.0 Beta');
+ var token = "506287133:AAFUxedYBjhvjNSO6HFitJqk-tLjZ1gY864";
+ var opt = {polling: true};
+ var bot = new TelegramBot(token, opt);
+
+ bot.on('message', function (msg) {
+ console.log(msg);
+ var id = msg.chat.id;
+ var echo = msg.text;
+
+ bot.sendMessage(id, echo);
+ }); \ No newline at end of file