Skip to content

Commit fb0ca01

Browse files
committed
feat: refractor Message to use the project types for compatibility with canis-tg
1 parent 5a6bef5 commit fb0ca01

62 files changed

Lines changed: 107 additions & 86 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/commands/8ball.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import { ball } from "../components/utils/data";
33

44
export const info = {

src/commands/ai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import log from "../components/utils/log";
33
import agentHandler from "../components/ai/agentHandler";
44
import { greetings } from "../components/utils/data";

src/commands/alert.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Message, MessageMedia } from "whatsapp-web.js";
1+
import { MessageMedia } from "whatsapp-web.js";
2+
import { Message } from "../../types/message"
23
import axios from "axios";
34
import log from "../components/utils/log";
45
import fs from "fs/promises";
@@ -25,7 +26,7 @@ export default async function (msg: Message) {
2526
responseType: "arraybuffer",
2627
}
2728
);
28-
29+
2930
const tempDir = "./.temp";
3031
await fs.mkdir(tempDir, { recursive: true });
3132

src/commands/bible.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import axios from "axios";
33
import log from "../components/utils/log";
44

src/commands/block.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import log from "../components/utils/log";
33
import { exec } from "child_process";
44
import util from "util";

src/commands/cat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import { cat } from "../components/utils/data";
33

44
export const info = {

src/commands/caution.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Message, MessageMedia } from "whatsapp-web.js";
1+
import { MessageMedia } from "whatsapp-web.js";
2+
import { Message } from "../../types/message"
23
import axios from "axios";
34
import log from "../components/utils/log";
45
import fs from "fs/promises";
@@ -26,7 +27,7 @@ export default async function (msg: Message) {
2627
responseType: "arraybuffer",
2728
}
2829
);
29-
30+
3031
const tempDir = "./.temp";
3132
await fs.mkdir(tempDir, { recursive: true });
3233

src/commands/chad.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import log from "../components/utils/log";
33
import agentHandler from "../components/ai/agentHandler";
44
import { greetings } from "../components/utils/data";

src/commands/dave.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import log from "../components/utils/log";
33
import agentHandler from "../components/ai/agentHandler";
44
import { greetings } from "../components/utils/data";

src/commands/dcma.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "whatsapp-web.js";
1+
import { Message } from "../../types/message"
22
import log from "../components/utils/log";
33

44
export const info = {
@@ -15,9 +15,9 @@ export default async function (msg: Message) {
1515

1616
const text = `
1717
\`DCMA\`
18-
This bot is intended for educational and entertainment purposes only.
19-
The owner of this bot does not claim ownership of any content shared through it.
20-
If you believe that your content has been used without permission,
18+
This bot is intended for educational and entertainment purposes only.
19+
The owner of this bot does not claim ownership of any content shared through it.
20+
If you believe that your content has been used without permission,
2121
please contact us to resolve the issue.
2222
`;
2323

0 commit comments

Comments
 (0)