@karinjs/adapter-qqbot 2.2.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps/cleanup.d.ts +6 -2
- package/dist/apps/cleanup.js +5 -10
- package/dist/apps/login.d.ts +2 -16
- package/dist/apps/login.js +138 -85
- package/dist/config-D1_LqrcJ.js +196 -0
- package/dist/index.d.ts +409 -234
- package/dist/index.js +347 -365
- package/dist/logger-sza6kuy3.js +27 -0
- package/dist/message-CVJVFAGR.js +1844 -0
- package/dist/utils-lb9ZdWay.js +32 -0
- package/dist/web.config.d.ts +3 -5
- package/dist/web.config.js +44 -84
- package/package.json +8 -5
- package/dist/common-by1GpV0b.js +0 -49
- package/dist/config-B_Gc9JKZ.js +0 -253
- package/dist/message-Dt4QkDYn.js +0 -1739
- package/dist/onboard-BXQ1cG8h.js +0 -252
- package/dist/utils-DIq0lGMt.js +0 -4
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { logger } from "node-karin";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/logger.ts
|
|
4
|
+
const PREFIX = "[QQ Official Bot]";
|
|
5
|
+
const m = {
|
|
6
|
+
trace: (...a) => logger.trace(PREFIX, ...a),
|
|
7
|
+
debug: (...a) => logger.debug(PREFIX, ...a),
|
|
8
|
+
info: (...a) => logger.info(PREFIX, ...a),
|
|
9
|
+
warn: (...a) => logger.warn(PREFIX, ...a),
|
|
10
|
+
error: (...a) => logger.error(PREFIX, ...a),
|
|
11
|
+
fatal: (...a) => logger.fatal(PREFIX, ...a),
|
|
12
|
+
mark: (...a) => logger.mark(PREFIX, ...a)
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* QQBot 日志函数
|
|
16
|
+
* - log('info', '消息')
|
|
17
|
+
* - log.info('消息')
|
|
18
|
+
*
|
|
19
|
+
* 日志级别由 karin 框架的 log.level 控制
|
|
20
|
+
*/
|
|
21
|
+
function log(level, ...args) {
|
|
22
|
+
m[level](...args);
|
|
23
|
+
}
|
|
24
|
+
Object.assign(log, m);
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { log as t };
|