bot = new TelegramBot(token, {polling: true}),
users = require("./users"),
chats = require("./chat");
bluebird.promisifyAll(redis.RedisClient.prototype);
bluebird.promisifyAll(redis.Multi.prototype);
function setUserLocation($uid, $location){
client.set("location-"+$uid, $location);
}
function getUserLocation ($uid){
return client.getAsync("location-" + $uid);
}
function setUserStep($uid,$step){
client.set("step-"+$uid, $step);
}
function getUserStep($uid){
return client.getAsync("step-" + $uid);
}
function setUserlimit($uid){
client.set("limit-" + $uid, "limited");
client.expireat("limit-"+$uid, parseInt((+new Date)/1000) + 60);
}
function getUserlimit($uid){
return client.getAsync("limit-" + $uid);
}
function incr_sign(uid){
return client.incrAsync("signed-"+ uid);
}
function setUserblock($uid,$pid){
client.set("blocked-" + $uid + "-" + $pid , "blocked");
}
async function getUserblock($uid,$pid){
let result = await client.getAsync("blocked-" + $uid + "-" + $pid).then();
if(!result){
result = await client.getAsync("blocked-" + $pid + "-" + $uid).then();
}
return result;
}
bluebird.promisifyAll(redis.RedisClient.prototype);
TypeError: Cannot read property 'prototype' of undefined