Bilibili直播间挂机助手3

B站直播间挂机用: 签到,领瓜子,移动端心跳,瓜子换硬币等

  1. // ==UserScript==
  2. // @name Bilibili直播间挂机助手3
  3. // @namespace SeaLoong
  4. // @version 3.1.11
  5. // @description B站直播间挂机用: 签到,领瓜子,移动端心跳,瓜子换硬币等
  6. // @author SeaLoong
  7. // @homepageURL https://github.com/SeaLoong/BLRHH
  8. // @supportURL https://github.com/SeaLoong/BLRHH/issues
  9. // @include /^https?:\/\/live\.bilibili\.com\/(blanc\/)?\d+.*$/
  10. // @license MIT License
  11. // @resource EULA https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/html/eula.html
  12. // @resource NOTICE https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/html/notice.html
  13. // @resource tfjs https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.3.0/dist/tf.min.js
  14. // @resource Sign https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/modules/sign.js
  15. // @resource Exchange https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/modules/exchange.js
  16. // @resource TreasureBox https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/modules/treasurebox.js
  17. // @resource TreasureBox/worker https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/modules/treasurebox/worker.js
  18. // @resource Heartbeat https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/modules/heartbeat.js
  19. // @resource DailyReward https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/modules/dailyreward.js
  20. // @resource AvoidDetection https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist/modules/avoiddetection.js
  21. // @resource jquery https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js
  22. // @resource lodash https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.19/lodash.min.js
  23. // @resource toastr https://cdn.bootcdn.net/ajax/libs/toastr.js/2.1.4/toastr.min.js
  24. // @resource spark-md5 https://cdn.bootcdn.net/ajax/libs/spark-md5/3.0.0/spark-md5.min.js
  25. // @resource Toast https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/toast.js
  26. // @resource Util https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/util.js
  27. // @resource Dialog https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/dialog.js
  28. // @resource Page https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/page.js
  29. // @resource Logger https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/logger.js
  30. // @resource Config https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/config.js
  31. // @resource Request https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/request.js
  32. // @resource Worker https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/worker.js
  33. // @resource Worker/env https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/worker/env.js
  34. // @resource Worker/channel https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/worker/channel.js
  35. // @resource AppToken https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist/modules/apptoken.js
  36. // @connect bilibili.com
  37. // @connect *
  38. // @grant unsafeWindow
  39. // @grant GM.getValue
  40. // @grant GM.setValue
  41. // @grant GM.deleteValue
  42. // @grant GM.listValues
  43. // @grant GM.getResourceUrl
  44. // @grant GM.xmlHttpRequest
  45. // @grant GM.addStyle
  46. // @grant GM.getResourceText
  47. // @grant GM.registerMenuCommand
  48. // @grant GM.unregisterMenuCommand
  49. // @run-at document-start
  50. // @incompatible chrome 不支持内核低于80的版本
  51. // @incompatible firefox 不支持内核低于72的版本
  52. // ==/UserScript==
  53.  
  54. 'use strict';
  55. var BLUL;
  56. (function () {
  57. try {
  58. ((0, eval)('(null ?? 1) && (({a: 1})?.a)')); // eslint-disable-line no-eval
  59. } catch (error) {
  60. console.error('[BLUL]不支持当前浏览器,请使用内核不低于Chromium80或Firefox72的浏览器', error);
  61. return;
  62. }
  63.  
  64. if (typeof unsafeWindow !== 'undefined') {
  65. const safeWindow = window;
  66. window = unsafeWindow; // eslint-disable-line no-global-assign
  67. window.safeWindow = safeWindow;
  68. }
  69.  
  70. if (window.top.BLUL) {
  71. // console.warn('[BLUL]检测到BLUL已存在,本脚本将不再初始化BLUL,脚本行为可能会出现异常');
  72. BLUL = new Proxy(window.top.BLUL, {
  73. has: function (target, property) {
  74. if (property === 'isChild') return true;
  75. return property in target;
  76. },
  77. get: function (target, property, receiver) {
  78. if (property === 'isChild') return true;
  79. return target[property];
  80. }
  81. });
  82. return;
  83. }
  84. BLUL = {
  85. debug: () => {},
  86. NAME: 'BLUL',
  87. GM: GM,
  88. ENVIRONMENT: GM.info.scriptHandler,
  89. ENVIRONMENT_VERSION: GM.info.version,
  90. VERSION: GM.info.script.version,
  91. RESOURCE: {},
  92. BLUL_MODULE_NAMES: ['Toast', 'Util', 'Dialog', 'Page', 'Logger', 'Config', 'Request', 'Worker', 'Worker/env', 'Worker/channel', 'AppToken'],
  93. INFO: {},
  94. TRACKED_LISTENERS: {}
  95. };
  96.  
  97. BLUL.lazyFn = function (...args) {
  98. let object = BLUL;
  99. let name;
  100. let promise = false;
  101. if (args.length >= 3) [object, name, promise] = args;
  102. else if (args.length === 2) [object, name] = args;
  103. else [name] = args;
  104. const list = [];
  105. let fn;
  106. Object.defineProperty(object, name, {
  107. configurable: true,
  108. get: () => fn ?? ((...args) => promise ? new Promise(resolve => list.push({ args, resolve })) : list.push({ args })),
  109. set: f => {
  110. fn = f;
  111. if (fn instanceof Function) {
  112. for (const { resolve, args } of list) {
  113. const v = fn.apply(object, args);
  114. if (resolve) resolve(v);
  115. }
  116. }
  117. }
  118. });
  119. };
  120.  
  121. BLUL.getResourceUrl = async (name) => await GM.getResourceUrl(name) ?? BLUL.RESOURCE[name] ?? ((BLUL.BLUL_MODULE_NAMES.includes(name) ? BLUL.RESOURCE.BLULBase : BLUL.RESOURCE.base) + '/modules/' + name.toLowerCase() + '.js');
  122.  
  123. BLUL.getResourceText = async (name) => {
  124. let ret = await GM.getResourceText(name);
  125. if (ret === undefined || ret === null) {
  126. ret = (await window.fetch(await BLUL.getResourceUrl(name))).text();
  127. }
  128. return ret;
  129. };
  130.  
  131. BLUL.createImportModuleFunc = function (context, keepContext = false) {
  132. /**
  133. * 如果需要上下文, Module 应当返回(export default)一个 Function/AsyncFunction, 其参数表示上下文, 且第一个参数是importModule
  134. * 在不需要上下文的情况下可以返回任意
  135. */
  136. const importUrlMap = new Map();
  137. async function importModule (name, reImport = false) {
  138. try {
  139. if (!reImport && importUrlMap.has(name)) return importUrlMap.get(name);
  140. const url = await BLUL.getResourceUrl(name);
  141. try {
  142. let ret = await import(url);
  143. ret = ret?.default ?? ret;
  144. if (ret instanceof Function) ret = ret.apply(window, context);
  145. ret = await ret;
  146. importUrlMap.set(name, ret);
  147. return ret;
  148. } catch (error) {
  149. (BLUL.Logger ?? console).error(`模块 ${name} 导入失败,尝试使用script标签加载`, error);
  150. return new Promise((resolve, reject) => {
  151. const elem = document.createElement('script');
  152. elem.onerror = reject;
  153. elem.onload = () => {
  154. importUrlMap.set(name, undefined);
  155. resolve();
  156. };
  157. document.body.appendChild(elem);
  158. elem.src = url;
  159. });
  160. }
  161. } catch (error) {
  162. (BLUL.Logger ?? console).error(`使用script标签加载模块 ${name} 失败`, error);
  163. }
  164. }
  165. if (!keepContext) context.unshift(importModule);
  166. return importModule;
  167. };
  168.  
  169. BLUL.createImportModuleFromCodeFunc = function (context, keepContext = false) {
  170. /**
  171. * 如果需要上下文, Module 应当返回(const exports = )一个 Function/AsyncFunction, 其参数表示上下文, 且第一个参数是importModule
  172. * 在不需要上下文的情况下可以返回任意
  173. * 这种方式不兼容 export 语法
  174. */
  175. const importCodeMap = new Map();
  176. async function importModule (code, reImport = false) {
  177. try {
  178. if (!reImport && importCodeMap.has(code)) return importCodeMap.get(code);
  179. code = (await BLUL.getResourceText(code) ?? code);
  180. code = code.replace('export default', 'const exports =') + ';\nif (typeof exports !== "undefined") return exports;';
  181. const fn = Function(code); // eslint-disable-line no-new-func
  182. let ret = fn.apply(window, context);
  183. if (ret instanceof Function) ret = ret.apply(window, context);
  184. ret = await ret;
  185. importCodeMap.set(code, ret);
  186. return ret;
  187. } catch (error) {
  188. (BLUL.Logger ?? console).error('模块导入失败', error, code);
  189. }
  190. }
  191. if (!keepContext) context.unshift(importModule);
  192. return importModule;
  193. };
  194.  
  195. BLUL.lazyFn('__addResourceConfig');
  196. BLUL.lazyFn('setBase');
  197. BLUL.lazyFn('importModule');
  198. BLUL.lazyFn('onupgrade');
  199. BLUL.lazyFn('onpreinit');
  200. BLUL.lazyFn('oninit');
  201. BLUL.lazyFn('onpostinit');
  202. BLUL.lazyFn('onrun');
  203.  
  204. BLUL.addResource = async function (name, urls, displayName) {
  205. if (BLUL.RESOURCE[name] !== undefined) return;
  206. BLUL.RESOURCE[name] = urls instanceof Array ? urls[0] : urls;
  207. BLUL.__addResourceConfig(name, urls, displayName);
  208. if (await GM.getValue('resetResource')) return;
  209. const resource = (await GM.getValue('config'))?.resource;
  210. if (!resource) return;
  211. if (resource[name]?.__VALUE__) BLUL.RESOURCE[name] = resource[name]?.__VALUE__;
  212. };
  213.  
  214. const listenerFilters = {};
  215. BLUL.addListenerFilter = (type, f) => {
  216. if (!(listenerFilters[type] instanceof Array)) listenerFilters[type] = [];
  217. listenerFilters[type].push(f);
  218. };
  219.  
  220. BLUL.removeListenerFilter = (type, f) => {
  221. if (listenerFilters[type] instanceof Array) {
  222. for (let i = 0; i < listenerFilters[type].length; i++) {
  223. if (listenerFilters[type][i] === f) {
  224. listenerFilters[type].splice(i, 1);
  225. break;
  226. }
  227. }
  228. }
  229. };
  230.  
  231. const addEventListener = EventTarget.prototype.addEventListener;
  232. EventTarget.prototype.addEventListener = function (type, listener, ...args) {
  233. if (listenerFilters[type] instanceof Array) {
  234. let allow = true;
  235. for (const f of listenerFilters[type]) {
  236. allow &= f.call(this, type, listener, ...args);
  237. if (!allow) return;
  238. }
  239. }
  240. if (!(BLUL.TRACKED_LISTENERS[type] instanceof Array)) BLUL.TRACKED_LISTENERS[type] = [];
  241. BLUL.TRACKED_LISTENERS[type].push({ target: this, listener, args });
  242. addEventListener.call(this, type, listener, ...args);
  243. };
  244.  
  245. const removeEventListener = EventTarget.prototype.removeEventListener;
  246. EventTarget.prototype.removeEventListener = function (type, listener, ...args) {
  247. if (BLUL.TRACKED_LISTENERS[type] instanceof Array) {
  248. for (let i = 0; i < BLUL.TRACKED_LISTENERS[type].length; i++) {
  249. const o = BLUL.TRACKED_LISTENERS[type][i];
  250. if (o.target === this && o.listener === listener) {
  251. BLUL.TRACKED_LISTENERS[type].splice(i, 1);
  252. break;
  253. }
  254. }
  255. }
  256. removeEventListener.call(this, type, listener, ...args);
  257. };
  258.  
  259. BLUL.removeAllListener = (type, rejectType = true) => {
  260. if (rejectType) {
  261. listenerFilters[type] = [t => type !== t];
  262. }
  263. for (const o of BLUL.TRACKED_LISTENERS[type]) {
  264. removeEventListener.call(o.target, type, o.listener, ...o.args);
  265. }
  266. BLUL.TRACKED_LISTENERS[type] = null;
  267. };
  268.  
  269. BLUL.recover = () => {
  270. EventTarget.prototype.addEventListener = addEventListener;
  271. EventTarget.prototype.removeEventListener = removeEventListener;
  272. };
  273.  
  274. let hasRun = false;
  275. BLUL.run = async (options) => {
  276. if (hasRun) return 2;
  277. hasRun = true;
  278. const { debug, slient, unique, login, EULA, EULA_VERSION, NOTICE } = options ?? {};
  279. if (debug) {
  280. BLUL.debug = console.debug;
  281. BLUL.debug(BLUL);
  282. }
  283.  
  284. // 等待load事件
  285. await new Promise(resolve => {
  286. window.addEventListener('load', resolve);
  287. });
  288.  
  289. // 特殊直播间页面,如 6 55 76
  290. if (!document.getElementById('aside-area-vm')) return 1;
  291.  
  292. const resetResourceMenuCmdId = await GM.registerMenuCommand?.('恢复默认源', async () => {
  293. await GM.setValue('resetResource', true);
  294. window.location.reload(true);
  295. });
  296. const unregisterMenuCmd = async () => {
  297. BLUL.debug('unregisterMenuCmd');
  298. if (await GM.getValue('resetResource')) {
  299. await BLUL.Config.reset('resource', true);
  300. await GM.deleteValue('resetResource');
  301. }
  302. await GM.unregisterMenuCommand?.(resetResourceMenuCmdId); // eslint-disable-line no-unused-expressions
  303. };
  304.  
  305. await BLUL.addResource('BLULBase', ['https://cdn.jsdelivr.net/gh/SeaLoong/BLUL@dist'], 'BLUL根目录');
  306. await BLUL.addResource('lodash', ['https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.19/lodash.min.js', 'https://cdn.jsdelivr.net/npm/lodash@4.17.19/lodash.min.js']);
  307. await BLUL.addResource('toastr', ['https://cdn.bootcdn.net/ajax/libs/toastr.js/2.1.4/toastr.min.js', 'https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js']);
  308. await BLUL.addResource('jquery', ['https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js', 'https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js', 'https://code.jquery.com/jquery-3.5.1.min.js']);
  309.  
  310. BLUL.onpostinit(unregisterMenuCmd);
  311.  
  312. const importModule = BLUL.createImportModuleFromCodeFunc([BLUL, GM]);
  313.  
  314. await importModule('jquery');
  315. await importModule('Toast');
  316.  
  317. if (unique) {
  318. const mark = 'running';
  319. // 检查重复运行
  320. if (await (async () => {
  321. const running = parseInt(await GM.getValue(mark) ?? 0);
  322. const ts = Date.now();
  323. return (ts - running >= 0 && ts - running <= 5e3);
  324. })()) {
  325. if (!slient) {
  326. BLUL.Toast.warn('已经有其他页面正在运行脚本了哟~');
  327. }
  328. await unregisterMenuCmd();
  329. return 2;
  330. }
  331. // 标记运行中
  332. await GM.setValue(mark, Date.now());
  333. const uniqueCheckInterval = setInterval(async () => {
  334. await GM.setValue(mark, Date.now());
  335. }, 4e3);
  336. window.addEventListener('unload', async () => {
  337. clearInterval(uniqueCheckInterval);
  338. await GM.deleteValue(mark);
  339. });
  340. }
  341. await importModule('lodash'); /* global _ */
  342. const Util = BLUL.Util = await importModule('Util');
  343.  
  344. await Util.callUntilTrue(() => window.BilibiliLive?.ROOMID && window.BilibiliLive?.ANCHOR_UID && window.BilibiliLive?.SHORT_ROOMID && window.__statisObserver);
  345.  
  346. if (login) {
  347. BLUL.INFO.CSRF = Util.getCookie('bili_jct');
  348. if (!BLUL.INFO.CSRF) {
  349. if (!slient) {
  350. BLUL.Toast.warn('你还没有登录呢~');
  351. }
  352. await unregisterMenuCmd();
  353. return 3;
  354. }
  355. await Util.callUntilTrue(() => window.BilibiliLive?.UID);
  356. }
  357. await importModule('Dialog');
  358.  
  359. if (EULA) {
  360. if (Util.compareVersion(EULA_VERSION, await GM.getValue('eulaVersion')) > 0) {
  361. await GM.setValue('eula', false);
  362. }
  363. if (!await GM.getValue('eula')) {
  364. const dialog = new BLUL.Dialog(await Util.result(EULA), '最终用户许可协议');
  365. dialog.addButton('我同意', () => dialog.close(true));
  366. dialog.addButton('我拒绝', () => dialog.close(false), 1);
  367. if (!await dialog.show()) {
  368. await unregisterMenuCmd();
  369. return 4;
  370. }
  371. await GM.setValue('eula', true);
  372. await GM.setValue('eulaVersion', EULA_VERSION);
  373. }
  374. }
  375.  
  376. await importModule('Page');
  377. await importModule('Logger');
  378. await importModule('Config');
  379. await importModule('Request');
  380. await importModule('Worker');
  381. await importModule('AppToken');
  382.  
  383. BLUL.Config.addItem('resource', '自定义源', false, { tag: 'input', help: '该设置项下的各设置项只在没有设置对应的 @resource 时有效。<br>此项直接影响脚本的加载,URL不正确或访问速度太慢均可能导致不能正常加载。<br>需要重置源可点击油猴图标再点击此脚本下的"恢复默认源"来重置。', attribute: { type: 'checkbox' } });
  384.  
  385. BLUL.__addResourceConfig = (name, urls, displayName = name) => {
  386. BLUL.Config.addItem(`resource.${name}`, displayName, BLUL.RESOURCE[name], {
  387. tag: 'input',
  388. list: urls instanceof Array ? urls : undefined,
  389. corrector: v => {
  390. const i = v.trim().search(/\/+$/);
  391. return i > -1 ? v.substring(0, i) : v;
  392. },
  393. attribute: { type: 'url' }
  394. });
  395. BLUL.Config.onload(() => {
  396. BLUL.RESOURCE[name] = BLUL.Config.get(`resource.${name}`);
  397. });
  398. };
  399.  
  400. BLUL.setBase = _.once(urls => BLUL.addResource('base', urls, '根目录'));
  401.  
  402. BLUL.importModule = importModule;
  403.  
  404. BLUL.INFO.UID = window.BilibiliLive.UID;
  405. BLUL.INFO.ROOMID = window.BilibiliLive.ROOMID;
  406. BLUL.INFO.ANCHOR_UID = window.BilibiliLive.ANCHOR_UID;
  407. BLUL.INFO.SHORT_ROOMID = window.BilibiliLive.SHORT_ROOMID;
  408. BLUL.INFO.VISIT_ID = window.__statisObserver.__visitId ?? '';
  409. BLUL.INFO.__NEPTUNE_IS_MY_WAIFU__ = window.__NEPTUNE_IS_MY_WAIFU__; // 包含B站自己请求返回的一些数据,当然也可以自行请求获取
  410.  
  411. const callHandler = f => {
  412. try {
  413. return f.apply(BLUL.load, [BLUL, GM]);
  414. } catch (error) {
  415. (BLUL.Logger ?? console).error(error);
  416. }
  417. };
  418. if (Util.compareVersion(BLUL.VERSION, await GM.getValue('version')) > 0) {
  419. await GM.setValue('version', BLUL.VERSION);
  420. if (NOTICE) {
  421. const dialog = new BLUL.Dialog(await Util.result(NOTICE), '更新说明-' + BLUL.VERSION);
  422. dialog.addButton('知道了', () => dialog.close());
  423. dialog.show();
  424. }
  425. BLUL.onupgrade = callHandler;
  426. }
  427. BLUL.onpreinit = callHandler;
  428. BLUL.oninit = callHandler;
  429. BLUL.onpostinit = callHandler;
  430. BLUL.onrun = callHandler;
  431.  
  432. window.top[BLUL.NAME] = window.top.BLUL = BLUL;
  433. return 0;
  434. };
  435. })();
  436.  
  437.  
  438.  
  439.  
  440.  
  441. /* global BLUL */
  442. 'use strict';
  443.  
  444. (async () => {
  445. const EULA = await GM.getResourceText('EULA');
  446. const NOTICE = await GM.getResourceText('NOTICE');
  447. BLUL.NAME = 'BLRHH';
  448. const result = await BLUL.run({ debug: await GM.getValue('debug'), slient: false, unique: true, login: true, EULA: EULA, EULA_VERSION: EULA.match(/\[v(.+?)\]/)[1], NOTICE: NOTICE });
  449. switch (result) {
  450. case 0:
  451. break;
  452. case 1:
  453. break;
  454. case 2:
  455. break;
  456. case 3:
  457. (BLUL.Logger ?? console).warn('脚本运行需要登录,当前未登录');
  458. break;
  459. case 4:
  460. (BLUL.Logger ?? console).warn('未同意EULA,脚本将不会运行');
  461. break;
  462. }
  463. if (result !== 0) {
  464. BLUL.recover();
  465. return;
  466. }
  467. BLUL.Logger.info('脚本信息', `运行环境: ${BLUL.ENVIRONMENT} ${BLUL.ENVIRONMENT_VERSION}`, `版本: ${BLUL.VERSION}`);
  468. const { importModule } = BLUL;
  469. try {
  470. const r = await BLUL.Request.fetch('https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByUser?room_id=' + BLUL.INFO.ROOMID);
  471. const obj = await r.json();
  472. BLUL.INFO.InfoByUser = obj.data;
  473. if (obj.code !== 0) {
  474. BLUL.Logger.warn(obj.message);
  475. }
  476. /* eslint-disable camelcase */
  477. const color = Number(BLUL.INFO.InfoByUser?.property?.danmu?.color).toString(16).toUpperCase();
  478. BLUL.Logger.info('用户信息', `uid: ${BLUL.INFO.UID} 用户名: ${BLUL.INFO.InfoByUser?.info?.uname}`,
  479. `手机绑定: ${BLUL.INFO.InfoByUser?.info?.mobile_verify ? '是' : '否'} 实名认证: ${BLUL.INFO.InfoByUser?.info?.identification ? '是' : '否'}`,
  480. `UL: ${BLUL.INFO.InfoByUser?.user_level?.level} 金瓜子: ${BLUL.INFO.InfoByUser?.wallet?.gold} 银瓜子: ${BLUL.INFO.InfoByUser?.wallet?.silver}`,
  481. `弹幕模式: ${BLUL.INFO.InfoByUser?.property?.danmu?.mode} 弹幕颜色: <span style="color: #${color};">${color}</span> 弹幕长度: ${BLUL.INFO.InfoByUser?.property?.danmu?.length}`,
  482. `房间id: ${BLUL.INFO.ROOMID} id: ${BLUL.INFO.SHORT_ROOMID} 主播uid: ${BLUL.INFO.ANCHOR_UID}`);
  483. /* eslint-enable camelcase */
  484. } catch (error) {
  485. BLUL.Logger.error('初始化用户信息失败', error);
  486. }
  487. BLUL.setBase('https://cdn.jsdelivr.net/gh/SeaLoong/BLRHH@dist');
  488. await importModule('Sign');
  489. await importModule('Exchange');
  490. await importModule('TreasureBox');
  491. await importModule('Heartbeat');
  492. await importModule('DailyReward');
  493. await importModule('AvoidDetection');
  494. })();
  495.  
  496.