Telegram test

by peka

HTML

<div class="setup">
</div>

JavaScript

//class selector .class
//id selector #id
var token = "TOKEN HERE";
var url = "https://api.telegram.org/bot";
$('div').html(token)

var tg = function(token) {
	bot_obj = {
  //bot variables
    offset : 0,
    botOwner : 0,
  //bot functions
  	getUpdates : function(offset) {
    	return $.ajax(url + token + "/getUpdates")
    },
  };
  return bot_obj;
}
tg(token).getUpdates(0).done(
	function(obj) {
  	alert(obj);
    console.log(obj);
});