From 75065c9be6c88c3bc34ee4ad91fde5d1468f7415 Mon Sep 17 00:00:00 2001 From: nguen <104498646+gawgua@users.noreply.github.com> Date: Wed, 3 Aug 2022 06:38:44 +0700 Subject: [PATCH] QoL: Auto target the only session (#22) --- src/commands/target.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/target.ts b/src/commands/target.ts index 84826d6..cb4812b 100644 --- a/src/commands/target.ts +++ b/src/commands/target.ts @@ -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; }