Yes, i figured out the problem. Thanks to @Vanilla and thank you Dr.McKay for all your hard work and dedication.   Here is the working code if anyone wants it. 
var TelegramBot = require('node-telegram-bot-api');
var SteamUser = require('steam-user');
var prompt = require('prompt');
const TOKEN = 'YOUR TOKEN HERE';
const bot = new TelegramBot(TOKEN, {polling: true});
var client = new SteamUser();
function steamlogin()
{
    
    var properties = [
      {
        name: 'username', 
        validator: /^[a-zA-Z\s\-]+$/,
        warning: 'Username must be only letters, spaces, or dashes'
      },
      {
        name: 'password',
        replace: '*',
        hidden: true
      }
    ];
    
    prompt.start();
    
    prompt.get(properties, function (err, result) {
      if (err) { return onErr(err); }
      console.log('Thank you for logging in.');
     
      client.logOn({
        "accountName": result.username,
        "password": result.password
      });
    
    });
    
    function onErr(err) {
      console.log(err);
      return 1;
    }
    client.on('loggedOn', function(details) {
        console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID());
        client.setPersona(SteamUser.EPersonaState.Online);
    });
    
}
function arma3()
{
    client.gamesPlayed([123456]);
}
bot.onText(/\/login/, (msg) => 
{
    steamlogin();
    bot.sendMessage(msg.chat.id,"Starting Login Process. SEE TERMINAL TO COMPLETE THE PROCESS");
});
bot.onText(/\/arma/, (msg) => 
{
    bot.sendMessage(msg.chat.id,"Started Arma 3");
    arma3();
});
bot.onText(/\/none/, (msg) => 
{
	client.gamesPlayed([]);
});
bot.onText(/\/kill/, (msg) => 
{
    bot.sendMessage(msg.chat.id,"Process Killed");
    process.exit()
});
bot.onText(/\/help/, (msg) => 
{
        bot.sendMessage(msg.chat.id,"/login = Login");
	bot.sendMessage(msg.chat.id,"/arma = Start playing Games");
	bot.sendMessage(msg.chat.id,"/none = Stop playing games");
	bot.sendMessage(msg.chat.id,"/kill = Kill the process");
});