My code is:-
function scammer(message) {
    return new Promise((resolve,reject)=>{
        if(condition){
            if (condition) {
                bot.KickMember(params).then((message)=>{
                    console.log("kicked");
                });
            } else {
                console.log("Not kicked");
            }
            resolve();
       }else{
          reject();
       }
   });
}
In the above code, function scammer works perfectly also the if-else statement but the then() does not work since I put it into a new promise, is there a way to execute then() without getting it out of the new promise.
 
     
    