QoL: Auto target the only session (#22)

This commit is contained in:
nguen 2022-08-03 06:38:44 +07:00 committed by GitHub
parent be8200ebf3
commit 75065c9be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,10 @@ export default async function handle(command: Command) {
c.log("No target specified");
c.log("Possible targets: ");
possibleTargets.forEach(x => c.trail(`${x.id} (UID: ${x.uid})`));
if(!possibleTargets[1] && possibleTargets[0]){
c.log(`Auto target the only session ${possibleTargets[0].uid}`);
Interface.target = possibleTargets[0].session;
}
return;
}