[feat] added github stars

This commit is contained in:
kwaroran
2023-05-07 23:33:53 +09:00
parent 60fa3558c4
commit d6a1d5dfdb
3 changed files with 15 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ async function googleTrans(text:string, reverse:boolean) {
const res = f.data as {sentences:{trans?:string}[]}
if(typeof(f.data) === 'string'){
return res
return res as unknown as string
}
return res.sentences.filter((s) => 'trans' in s).map((s) => s.trans).join('');
}