@znan/wabot 0.0.15 → 0.0.18

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.
@@ -1,30 +0,0 @@
1
- declare class Scraper {
2
- /**
3
- *
4
- * @param url
5
- * @param time
6
- * @returns
7
- */
8
- shorten: (url: string, time?: number) => Promise<unknown>;
9
- /**
10
- *
11
- * @param i
12
- * @param originalFilePath
13
- * @returns
14
- */
15
- uploader: (i: Buffer | string, originalFilePath?: null) => Promise<unknown>;
16
- /**
17
- *
18
- * @param i
19
- * @param extension
20
- * @returns
21
- */
22
- tmpfiles: (i: Buffer | string, extension?: null) => Promise<unknown>;
23
- /**
24
- *
25
- * @param i
26
- * @returns
27
- */
28
- imgbb: (i: Buffer | string) => Promise<unknown>;
29
- }
30
- export = Scraper;
@@ -1,29 +0,0 @@
1
- declare class Cached {
2
- static cacheFunction(id: any, meta: () => Promise<any>): void;
3
- static getCache(m: any): void;
4
- private cache;
5
- private cacheTtl;
6
- private nullCacheTtl;
7
- constructor(defaultCacheTtl?: number, defaultNullCacheTtl?: number);
8
- /**
9
- *
10
- * @param key
11
- * @param value
12
- * @param ttl
13
- */
14
- setCache(key: string, value: any, ttl: number): void;
15
- /**
16
- *
17
- * @param key
18
- * @returns
19
- */
20
- getCache<T = any>(key: string): T | null;
21
- /**
22
- *
23
- * @param key
24
- * @param asyncFunction
25
- * @returns
26
- */
27
- cacheFunction<T = any>(key: string, asyncFunction: () => Promise<T>): Promise<T | null>;
28
- }
29
- export = Cached;
@@ -1,15 +0,0 @@
1
- type CooldownOptions = {
2
- cooldownSeconds?: number;
3
- };
4
- declare class Cooldown {
5
- private cooldownSeconds;
6
- private timestamps;
7
- constructor(options: CooldownOptions);
8
- /**
9
- *
10
- * @param userJid
11
- * @returns
12
- */
13
- check(userJid: string): boolean;
14
- }
15
- export = Cooldown;
@@ -1,8 +0,0 @@
1
- type Plugin = {
2
- help?: string[];
3
- aliases?: string[];
4
- };
5
- declare class GetCommand {
6
- bind(plugs: Map<string, Plugin>): string[];
7
- }
8
- export = GetCommand;
@@ -1,8 +0,0 @@
1
- import { WASocket } from '@whiskeysockets/baileys';
2
- interface Activity {
3
- isCommand?: boolean;
4
- isSpam?: boolean;
5
- isBanned?: boolean;
6
- }
7
- export default function Logger(conn: WASocket, m: any, activity?: Activity): Promise<void>;
8
- export {};
@@ -1,4 +0,0 @@
1
- declare class ParseCommand {
2
- bind(m: any, setting: any, plugs: any): Promise<any>;
3
- }
4
- export = ParseCommand;
@@ -1,26 +0,0 @@
1
- interface PluginModule {
2
- run: (...args: any[]) => any;
3
- help?: string[];
4
- aliases?: string[];
5
- filePath?: string;
6
- [key: string]: any;
7
- }
8
- interface PluginOptions {
9
- dir?: string;
10
- delay?: number;
11
- }
12
- declare class Plugin {
13
- private dir;
14
- private delay;
15
- commands: Map<string, PluginModule>;
16
- files: Map<string, PluginModule>;
17
- events: PluginModule[];
18
- private fileMap;
19
- constructor(options?: PluginOptions);
20
- private _clearRequireCache;
21
- private _unregisterPlugin;
22
- private _loadPluginFromFile;
23
- private _initialScan;
24
- watch(): void;
25
- }
26
- export = Plugin;
@@ -1,10 +0,0 @@
1
- declare class Session {
2
- private session;
3
- private BACKUP_DIR;
4
- constructor(sessionPath: string);
5
- private init;
6
- backup(conn: any, path: any): Promise<void>;
7
- restore(conn: any): Promise<void>;
8
- isBackupExist(conn: any): Promise<boolean>;
9
- }
10
- export = Session;
@@ -1,32 +0,0 @@
1
- interface UserData {
2
- banned?: boolean;
3
- ban_temporary?: number;
4
- ban_times?: number;
5
- }
6
- interface Setting {
7
- antispam: boolean;
8
- }
9
- interface Message {
10
- sender: string;
11
- chat: string;
12
- }
13
- interface Connection {
14
- reply(chat: string, text: string, quoted: Message): void;
15
- }
16
- interface SpamOptions {
17
- mode?: 'command' | 'msg' | 'all';
18
- messageLimit?: number;
19
- timeWindowSeconds?: number;
20
- banCooldownSeconds?: number;
21
- maxBanTimes?: number;
22
- commandCooldownSeconds?: number;
23
- }
24
- declare class Spam {
25
- private config;
26
- private userMessages;
27
- private commandCooldown;
28
- constructor(options: SpamOptions);
29
- check(conn: Connection, m: Message, users: UserData, isCommand?: boolean, command?: string, setting?: Setting): boolean;
30
- private detectSpam;
31
- }
32
- export = Spam;