Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Bump to v1.1.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzeng committed Jul 11, 2023
1 parent 2545136 commit f002a16
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shopee-coins-bot",
"version": "1.0.18",
"version": "1.1.0-alpha.1",
"description": "A robot that receives shopee coins.",
"scripts": {
"build": "tsc && ncc -m build src/index.js && rm src/*.js",
Expand Down
13 changes: 11 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Bot from './tw-shopee-bot'
import { isValidPassword } from './util'
import * as exitCode from './exit-code'

const version = '1.0.18'
const version = '1.1.0-alpha.1'
const majorVersion = version.split('.')[0]
program
.name(`docker run -it hyperbola/shopee-coins-bot:${majorVersion}`)
Expand Down Expand Up @@ -72,7 +72,11 @@ async function getPassword(): Promise<string | undefined> {
try {
let pass = await fs.readFile(passPath, 'utf-8')
// Get the first line of password file
pass = pass.split('\n')[0]
const passwordLines = pass.split('\n')
if (passwordLines.length > 1) {
logger.warn('Read more than one lines from password file. Only the first line is considered password.')
}
pass = passwordLines[0]
logger.debug('Password read from file.')
return pass
} catch (e: unknown) {
Expand Down Expand Up @@ -122,6 +126,11 @@ async function main() {
logger.warn('I will let you go. Please refer to this issue: https://github.com/wdzeng/shopee-coins-bot/issues/4')
}

// Warn if using screenshot in kelly image
if (process.env['IMAGE_VARIANT'] === 'kelly' && screenshot) {
logger.warn('You are using kelly image. You may not see CJK characters in screenshots.')
}

// Run bot.
const bot = new Bot(username, password, cookies)
let result: number
Expand Down

0 comments on commit f002a16

Please sign in to comment.