MCPcopy Create free account
hub / github.com/Semporia/Scripts / submitCode

Function submitCode

jd_plantBean.js:565–587  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

563}
564//提交互助码
565function submitCode() {
566 return new Promise(async resolve => {
567 $.get({url: `http://www.helpu.cf/jdcodes/submit.php?code=${$.myPlantUuid}&type=bean`, timeout: 10000}, (err, resp, data) => {
568 try {
569 if (err) {
570 console.log(`${JSON.stringify(err)}`)
571 console.log(`${$.name} API请求失败,请检查网路重试`)
572 } else {
573 if (data) {
574 //console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
575 data = JSON.parse(data);
576 }
577 }
578 } catch (e) {
579 $.logErr(e, resp)
580 } finally {
581 resolve(data);
582 }
583 })
584 await $.wait(15000);
585 resolve()
586 })
587}
588//格式化助力码
589function shareCodesFormat() {
590 return new Promise(async resolve => {

Callers 1

jdPlantBeanFunction · 0.70

Calls 4

getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected