This commit is contained in:
Cedric Hoelzl 2020-07-01 11:25:44 +02:00
parent 2d67e04263
commit 2750d2a520

View File

@ -67,13 +67,16 @@ module.exports = function(){
},
action : (bot,event,message)=>{
var ids = message.text.replace('.','').split('\n');
console.log(ids);
return db.get_v(event.chat.id).then(res =>{
if(res){
return db.set_v(event.chat.id,res.concat(ids)).then(res=>{
console.log(res)
return event.reply("Added ids to Tracking.", {"parse_mode":"Markdown"})
});
}else{
return db.set_v(event.chat.id, ids).then(res=>{
console.log(res)
return event.reply("Added ids to Tracking.", {"parse_mode":"Markdown"});
});
}