@atri-bot/plugin-the-cake-is-a-lie 1.1.0 → 1.1.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/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { BasePlugin } from '@atri-bot/core';
|
|
|
2
2
|
|
|
3
3
|
declare class Plugin extends BasePlugin {
|
|
4
4
|
pluginName: string;
|
|
5
|
-
|
|
5
|
+
disableAutoLoadConfig: boolean;
|
|
6
6
|
load(): void;
|
|
7
7
|
unload(): void;
|
|
8
8
|
private messages;
|
|
9
|
-
private
|
|
9
|
+
private cakeIsALie;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export { Plugin };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BasePlugin as l}from"@atri-bot/core";import{Structs as e}from"node-napcat-ts";var
|
|
1
|
+
import{BasePlugin as l}from"@atri-bot/core";import{Structs as e}from"node-napcat-ts";var s=class extends l{pluginName="the_cake_is_a_lie";disableAutoLoadConfig=!0;load(){this.regMessageEvent({regexp:/^(the cake is a lie|蛋糕是个谎言)$/i,callback:this.cakeIsALie.bind(this)})}unload(){}messages=[e.text("You Will Be Baked, And Then There Will Be Cake"),e.music("163",2005125394),e.text("But The Cake Is A Lie")];async cakeIsALie({context:a}){this.messages.forEach(async(t,i)=>{setTimeout(async()=>{await this.bot.sendMsg(a,[t],{reply:!1,at:!1})},i*1e3)})}};export{s as Plugin};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { Structs, type SendMessageSegment } from 'node-napcat-ts'
|
|
|
3
3
|
|
|
4
4
|
export class Plugin extends BasePlugin {
|
|
5
5
|
pluginName = 'the_cake_is_a_lie'
|
|
6
|
-
|
|
6
|
+
disableAutoLoadConfig = true
|
|
7
7
|
|
|
8
8
|
load() {
|
|
9
9
|
this.regMessageEvent({
|
|
10
10
|
regexp: /^(the cake is a lie|蛋糕是个谎言)$/i,
|
|
11
|
-
callback: this.
|
|
11
|
+
callback: this.cakeIsALie.bind(this),
|
|
12
12
|
})
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@ export class Plugin extends BasePlugin {
|
|
|
20
20
|
Structs.text('But The Cake Is A Lie'),
|
|
21
21
|
]
|
|
22
22
|
|
|
23
|
-
private async
|
|
23
|
+
private async cakeIsALie({ context }: MessageCallback) {
|
|
24
24
|
this.messages.forEach(async (message, index) => {
|
|
25
25
|
setTimeout(async () => {
|
|
26
26
|
await this.bot.sendMsg(context, [message], { reply: false, at: false })
|