koishi-plugin-toram 4.2.0-test.1 → 4.2.0-test.2
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/lib/index.d.ts +0 -3
- package/lib/index.js +3 -3
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -2,9 +2,6 @@ import { Context, Logger, Schema, Session } from 'koishi';
|
|
|
2
2
|
export declare const name = "toram";
|
|
3
3
|
export declare const inject: string[];
|
|
4
4
|
declare module 'koishi' {
|
|
5
|
-
interface Events {
|
|
6
|
-
'notice.notify'(...args: any[]): void;
|
|
7
|
-
}
|
|
8
5
|
}
|
|
9
6
|
export interface Config {
|
|
10
7
|
qq: string;
|
package/lib/index.js
CHANGED
|
@@ -851,6 +851,9 @@ async function apply(ctx, config) {
|
|
|
851
851
|
config.monthlyCardReminder_eveningTime,
|
|
852
852
|
config.monthlyCardReminder_latenightTime
|
|
853
853
|
]);
|
|
854
|
+
ctx.on("notice", (session) => {
|
|
855
|
+
if (config.sendDialog) logger.info(session);
|
|
856
|
+
});
|
|
854
857
|
ctx.middleware(async (session, next) => {
|
|
855
858
|
if (config.sendDialog) logger.info(session);
|
|
856
859
|
if (session.event.message.elements.some((e) => e.type === "at" && e.attrs.id === config.qq)) {
|
|
@@ -866,9 +869,6 @@ async function apply(ctx, config) {
|
|
|
866
869
|
}
|
|
867
870
|
return next();
|
|
868
871
|
});
|
|
869
|
-
ctx.on("notice.notify", (session) => {
|
|
870
|
-
if (config.sendDialog) logger.info(session);
|
|
871
|
-
});
|
|
872
872
|
ctx.command("升级 <等级数>").action(async ({ session }, ...args) => {
|
|
873
873
|
const event = newEvent(ctx, session, config, logger);
|
|
874
874
|
command_levelUP(event, args);
|