discordx
Advanced tools
Comparing version 11.1.11 to 11.1.12
@@ -935,3 +935,3 @@ "use strict"; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | ||
trigger(options, params) { | ||
@@ -938,0 +938,0 @@ return this.instance.trigger(options)(params); |
@@ -62,3 +62,3 @@ "use strict"; | ||
// If it's the main method | ||
res = await guardToExecute?.fn( | ||
res = await (guardToExecute?.fn)( | ||
// method(...ParsedOptions, [Interaction, Client], ...) => method(...ParsedOptions, Interaction, Client, ...) | ||
@@ -70,3 +70,3 @@ ...this.parseParams(...params), ...params, paramsToNext); | ||
// method([Interaction, Client]) | ||
res = await guardToExecute?.fn(...params, nextFn, paramsToNext); | ||
res = await (guardToExecute?.fn)(...params, nextFn, paramsToNext); | ||
} | ||
@@ -73,0 +73,0 @@ if (res) { |
@@ -14,3 +14,2 @@ "use strict"; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
function Guard(...fns) { | ||
@@ -17,0 +16,0 @@ return function (target, key, descriptor) { |
@@ -401,5 +401,3 @@ "use strict"; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
trigger(options) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const responses = []; | ||
@@ -411,3 +409,2 @@ const eventsToExecute = this._events.filter((on) => { | ||
}); | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return async (...params) => { | ||
@@ -414,0 +411,0 @@ await Promise.all(eventsToExecute.map(async (ev) => { |
import type { ClientOptions as DiscordJSClientOptions, Message } from "discord.js"; | ||
import type { ArgSplitter, GuardFunction, IGuild } from "../../index.js"; | ||
import type { Awaitable, ILogger, IPrefixResolver } from "../index.js"; | ||
export interface SimpleCommandConfig { | ||
export declare type SimpleCommandConfig = { | ||
/** | ||
@@ -22,3 +22,3 @@ * Global argument splitter for simple command | ||
}; | ||
} | ||
}; | ||
export interface ClientOptions extends DiscordJSClientOptions { | ||
@@ -25,0 +25,0 @@ /** |
@@ -61,6 +61,6 @@ import type { ApplicationCommandOptionData, ApplicationCommandOptionType, ApplicationCommandType, AutocompleteInteraction, ChannelType, LocalizationMap, PermissionResolvable } from "discord.js"; | ||
}; | ||
export interface ApplicationCommandOptionChoiceDataEx { | ||
export declare type ApplicationCommandOptionChoiceDataEx = { | ||
name: string; | ||
nameLocalizations?: LocalizationMap | null; | ||
value: string | number; | ||
} | ||
}; |
@@ -931,3 +931,3 @@ import { DIService } from "@discordx/di"; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | ||
trigger(options, params) { | ||
@@ -934,0 +934,0 @@ return this.instance.trigger(options)(params); |
@@ -59,3 +59,3 @@ import { Decorator } from "@discordx/internal"; | ||
// If it's the main method | ||
res = await guardToExecute?.fn( | ||
res = await (guardToExecute?.fn)( | ||
// method(...ParsedOptions, [Interaction, Client], ...) => method(...ParsedOptions, Interaction, Client, ...) | ||
@@ -67,3 +67,3 @@ ...this.parseParams(...params), ...params, paramsToNext); | ||
// method([Interaction, Client]) | ||
res = await guardToExecute?.fn(...params, nextFn, paramsToNext); | ||
res = await (guardToExecute?.fn)(...params, nextFn, paramsToNext); | ||
} | ||
@@ -70,0 +70,0 @@ if (res) { |
@@ -11,3 +11,2 @@ import { Modifier } from "@discordx/internal"; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export function Guard(...fns) { | ||
@@ -14,0 +13,0 @@ return function (target, key, descriptor) { |
@@ -397,5 +397,3 @@ import { DIService } from "@discordx/di"; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
trigger(options) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const responses = []; | ||
@@ -407,3 +405,2 @@ const eventsToExecute = this._events.filter((on) => { | ||
}); | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return async (...params) => { | ||
@@ -410,0 +407,0 @@ await Promise.all(eventsToExecute.map(async (ev) => { |
import type { ClientOptions as DiscordJSClientOptions, Message } from "discord.js"; | ||
import type { ArgSplitter, GuardFunction, IGuild } from "../../index.js"; | ||
import type { Awaitable, ILogger, IPrefixResolver } from "../index.js"; | ||
export interface SimpleCommandConfig { | ||
export declare type SimpleCommandConfig = { | ||
/** | ||
@@ -22,3 +22,3 @@ * Global argument splitter for simple command | ||
}; | ||
} | ||
}; | ||
export interface ClientOptions extends DiscordJSClientOptions { | ||
@@ -25,0 +25,0 @@ /** |
@@ -61,6 +61,6 @@ import type { ApplicationCommandOptionData, ApplicationCommandOptionType, ApplicationCommandType, AutocompleteInteraction, ChannelType, LocalizationMap, PermissionResolvable } from "discord.js"; | ||
}; | ||
export interface ApplicationCommandOptionChoiceDataEx { | ||
export declare type ApplicationCommandOptionChoiceDataEx = { | ||
name: string; | ||
nameLocalizations?: LocalizationMap | null; | ||
value: string | number; | ||
} | ||
}; |
{ | ||
"name": "discordx", | ||
"version": "11.1.11", | ||
"version": "11.1.12", | ||
"private": false, | ||
@@ -66,5 +66,5 @@ "description": "Create a discord bot with TypeScript and Decorators!", | ||
"@discordx/importer": "^1.1.10", | ||
"@types/jest": "^28.1.8", | ||
"@types/jest": "^29.0.0", | ||
"@types/lodash": "^4.14.184", | ||
"@types/node": "^18.7.13", | ||
"@types/node": "^18.7.14", | ||
"discord.js": "^14.3.0", | ||
@@ -74,3 +74,3 @@ "jest": "^28.1.3", | ||
"ts-node": "^10.9.1", | ||
"typescript": "4.7.4" | ||
"typescript": "4.8.2" | ||
}, | ||
@@ -77,0 +77,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
605671
10141