mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-07-22 21:13:47 +08:00
fix: 低版本node(< v15)不支持replaceAll
Nodejs v15 has V8 8.6 and thus that's the first nodejs version where you can use .replaceAll()
This commit is contained in:
+2
-2
@@ -421,7 +421,7 @@ class Monitor extends Searcher {
|
||||
let
|
||||
/**转发评语 */
|
||||
RandomStr = getRandomOne(relays)
|
||||
.replaceAll('${uname}', uname_map[real_uid] || uname),
|
||||
.replace(/\$\{uname\}/g, uname_map[real_uid] || uname),
|
||||
/**控制字段 */
|
||||
new_ctrl = [];
|
||||
|
||||
@@ -481,7 +481,7 @@ class Monitor extends Searcher {
|
||||
if (isSendChat) {
|
||||
onelotteryinfo.rid = rid
|
||||
onelotteryinfo.chat = getRandomOne(chats)
|
||||
.replaceAll('${uname}', uname_map[real_uid] || uname)
|
||||
.replace(/\$\{uname\}/g, uname_map[real_uid] || uname)
|
||||
}
|
||||
|
||||
alllotteryinfo.push(onelotteryinfo);
|
||||
|
||||
Reference in New Issue
Block a user