nicegram.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /******************************
  2. > 应用名称:Nicegram
  3. *******************************
  4. [rewrite_local]
  5. https?:\/\/nicegram\.cloud\/api\/v6\/user\/info url script-response-body https://git.jojo21.cf/shawenguan/Quantumult-X/raw/master/Scripts/nicegram/nicegram.js
  6. [MITM]
  7. hostname=nicegram.cloud
  8. ********************************/
  9. # {
  10. # "status" : 200,
  11. # "data" : {
  12. # "user" : {
  13. # "id" : 1307515,
  14. # "last_ads_view" : 0,
  15. # "next_daily_reward_claim_time" : 1703807999,
  16. # "last_getting_daily_reward" : 1,
  17. # "telegramAuthToken" : "638ccd5e9070e3753dc09a51273161c8087d042429cd030f111604e5f028cb79",
  18. # "referral_link" : "https://t.me/NicegramConnectBot?start=e758eb7ea54e3b591c6a0a22506566ba1be7d4ce22990898ed9cc40928ef4654",
  19. # "store_subscription" : false,
  20. # "user_name" : null,
  21. # "first_name" : "Ai",
  22. # "gems_balance" : 9,
  23. # "subscription" : false,
  24. # "server_time" : 1703744374,
  25. # "last_name" : "Yo",
  26. # "lifetime_subscription" : false
  27. # }
  28. # },
  29. # "message" : ""
  30. # }
  31. function doUnlockPremium() {
  32. console.log('Nicegram Premium已解锁😎');
  33. const data = JSON.parse(typeof $response != "undefined" && $response.body || null);
  34. if(data.status == 200 && data.data){
  35. const user = data.data.user;
  36. user['subscription'] = true;
  37. user['store_subscription'] = true;
  38. user['lifetime_subscription'] = true;
  39. }
  40. $done({ body: JSON.stringify(data) });
  41. }
  42. doUnlockPremium();