@@ -6,7 +6,7 @@ import Bot from './tw-shopee-bot'
6
6
import { isValidPassword } from './util'
7
7
import * as exitCode from './exit-code'
8
8
9
- const version = '1.0.18 '
9
+ const version = '1.1.0-alpha.1 '
10
10
const majorVersion = version . split ( '.' ) [ 0 ]
11
11
program
12
12
. name ( `docker run -it hyperbola/shopee-coins-bot:${ majorVersion } ` )
@@ -72,7 +72,11 @@ async function getPassword(): Promise<string | undefined> {
72
72
try {
73
73
let pass = await fs . readFile ( passPath , 'utf-8' )
74
74
// Get the first line of password file
75
- pass = pass . split ( '\n' ) [ 0 ]
75
+ const passwordLines = pass . split ( '\n' )
76
+ if ( passwordLines . length > 1 ) {
77
+ logger . warn ( 'Read more than one lines from password file. Only the first line is considered password.' )
78
+ }
79
+ pass = passwordLines [ 0 ]
76
80
logger . debug ( 'Password read from file.' )
77
81
return pass
78
82
} catch ( e : unknown ) {
@@ -122,6 +126,11 @@ async function main() {
122
126
logger . warn ( 'I will let you go. Please refer to this issue: https://github.com/wdzeng/shopee-coins-bot/issues/4' )
123
127
}
124
128
129
+ // Warn if using screenshot in kelly image
130
+ if ( process . env [ 'IMAGE_VARIANT' ] === 'kelly' && screenshot ) {
131
+ logger . warn ( 'You are using kelly image. You may not see CJK characters in screenshots.' )
132
+ }
133
+
125
134
// Run bot.
126
135
const bot = new Bot ( username , password , cookies )
127
136
let result : number
0 commit comments