@@ -35,6 +35,7 @@ export interface WebhooksManager extends EventEmitter {
35
35
* const manager = new WebhooksManager(client, PORT, {
36
36
* database: "mongoose", // mongoose or sqlite
37
37
* protocol: 'discordjs',
38
+ * connectionString: 'MongooseURL', // Only Use This If The Database Is Set To Mongoose
38
39
* extra: {
39
40
* proxyTrust: true, // Use if behind a proxy
40
41
* shardedClient: true, // Use if behind a sharded client
@@ -48,6 +49,7 @@ export interface WebhooksManager extends EventEmitter {
48
49
* @param client - The Discord.js v14 client instance.
49
50
* @param options - Configuration options for the WebhooksManager.
50
51
* @param options.database - The database type to use ("mongoose" or "sqlite").
52
+ * @param options.connectionString - The connection string for the database.
51
53
* @param options.protocol - The protocol to use ("discordjs" or "eris").
52
54
* @param options.port - The port for the Express webserver.
53
55
* @param options.extra - Additional storage options.
@@ -111,7 +113,7 @@ export declare class WebhooksManager extends EventEmitter {
111
113
* await voteManager.setStroage('mongoose', 'MongooseURL');
112
114
* ```
113
115
*/
114
- setStroage ( DB : string , string : string ) : Promise < void > ;
116
+ setStroage ( DB : string , connectionString : string ) : Promise < void > ;
115
117
/**
116
118
* @example
117
119
* ```js
@@ -147,6 +149,7 @@ export declare class WebhooksManager extends EventEmitter {
147
149
* ```
148
150
*/
149
151
getServer ( serverID : string ) : Promise < any > ;
152
+ private updateVoteCount ;
150
153
/**
151
154
* @example
152
155
* ```js
@@ -166,17 +169,29 @@ export declare class WebhooksManager extends EventEmitter {
166
169
* voteClient.IBLVoteHook("IBLHook", "LOADS_OF_RANDOMNESS", true);
167
170
* ```
168
171
*/
169
- IBLVoteHook ( url : any , auth : any , toggle : boolean ) : Promise < void > ;
172
+ IBLVoteHook ( url : string , auth : string , toggle : boolean ) : Promise < void > ;
170
173
/**
171
174
* @deprecated Legacy API
172
175
*/
173
176
PBLVoteHook ( url : any , auth : any , toggle : boolean ) : Promise < void > ;
174
- VoidBotsVoteHook ( url : any , auth : any , toggle : boolean ) : Promise < void > ;
175
- DiscordLabsVoteHook ( url : any , auth : any , toggle : boolean ) : Promise < void > ;
176
- BListVoteHook ( url : any , auth : any , toggle : boolean ) : Promise < void > ;
177
- MYBVoteHook ( url : any , auth : any , toggle : boolean ) : Promise < void > ;
178
- DBCVoteHook ( url : any , auth : any , toggle : boolean ) : Promise < void > ;
179
- getVotes ( userID : any , option : string ) : Promise < void > ;
177
+ VoidBotsVoteHook ( url : string , auth : string , toggle : boolean ) : Promise < void > ;
178
+ DiscordLabsVoteHook ( url : string , auth : string , toggle : boolean ) : Promise < void > ;
179
+ BListVoteHook ( url : string , auth : string , toggle : boolean ) : Promise < void > ;
180
+ MYBVoteHook ( url : string , auth : string , toggle : boolean ) : Promise < void > ;
181
+ DBCVoteHook ( url : string , auth : string , toggle : boolean ) : Promise < void > ;
182
+ /**
183
+ * Get the number of votes for a user
184
+ * @param {string } userID - The ID of the user
185
+ * @param {string } option - The time period for votes ('total', 'daily', 'weekly', 'monthly')
186
+ * @returns {Promise<number> } The number of votes for the specified period
187
+ * @throws {Error } If an invalid option is provided or if userID is missing
188
+ * @example
189
+ * ```js
190
+ * const totalVotes = await voteManager.getVotes('123456789', 'total');
191
+ * console.log(`Total votes: ${totalVotes}`);
192
+ * ```
193
+ */
194
+ getVotes ( userID : string , option : string ) : Promise < number > ;
180
195
/**
181
196
* Inits the manager
182
197
* @private
0 commit comments