@notenoughupdates/discord-akairo
Advanced tools
Comparing version 9.0.1 to 9.0.2
{ | ||
"name": "@notenoughupdates/discord-akairo", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"description": "A highly customizable bot framework for Discord.js.", | ||
@@ -29,23 +29,23 @@ "main": "./dist/src/index.js", | ||
"devDependencies": { | ||
"@discordjs/voice": "^0.5.0", | ||
"@types/lodash": "^4.14.172", | ||
"@types/node": "^10.14.4", | ||
"@discordjs/voice": "^0.6.0", | ||
"@types/lodash": "^4.14.175", | ||
"@types/node": "^16.10.2", | ||
"@types/source-map-support": "^0.5.4", | ||
"@typescript-eslint/eslint-plugin": "^4.29.0", | ||
"@typescript-eslint/parser": "^4.29.0", | ||
"@typescript-eslint/eslint-plugin": "^4.32.0", | ||
"@typescript-eslint/parser": "^4.32.0", | ||
"discord-api-types": "^0.22.0", | ||
"discord.js": "npm:@notenoughupdates/discord.js", | ||
"discord.js-docgen": "discordjs/docgen", | ||
"eslint": "^7.27.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"jsdoc": "^3.6.4", | ||
"prettier": "^2.3.0", | ||
"jsdoc": "^3.6.7", | ||
"prettier": "^2.4.1", | ||
"rimraf": "^3.0.2", | ||
"shx": "^0.3.3", | ||
"typescript": "^4.3.5" | ||
"typescript": "^4.4.3" | ||
}, | ||
"dependencies": { | ||
"discord-akairo-message-util": "NotEnoughUpdates/discord-akairo-message-util", | ||
"discord-akairo-message-util": "npm:@notenoughupdates/discord-akairo-message-util@latest", | ||
"lodash": "^4.17.21", | ||
"source-map-support": "^0.5.19" | ||
"source-map-support": "^0.5.20" | ||
}, | ||
@@ -52,0 +52,0 @@ "scripts": { |
{ | ||
"name": "@notenoughupdates/discord-akairo", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"description": "A highly customizable bot framework for Discord.js.", | ||
@@ -29,23 +29,23 @@ "main": "./dist/src/index.js", | ||
"devDependencies": { | ||
"@discordjs/voice": "^0.5.0", | ||
"@types/lodash": "^4.14.172", | ||
"@types/node": "^10.14.4", | ||
"@discordjs/voice": "^0.6.0", | ||
"@types/lodash": "^4.14.175", | ||
"@types/node": "^16.10.2", | ||
"@types/source-map-support": "^0.5.4", | ||
"@typescript-eslint/eslint-plugin": "^4.29.0", | ||
"@typescript-eslint/parser": "^4.29.0", | ||
"@typescript-eslint/eslint-plugin": "^4.32.0", | ||
"@typescript-eslint/parser": "^4.32.0", | ||
"discord-api-types": "^0.22.0", | ||
"discord.js": "npm:@notenoughupdates/discord.js", | ||
"discord.js-docgen": "discordjs/docgen", | ||
"eslint": "^7.27.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"jsdoc": "^3.6.4", | ||
"prettier": "^2.3.0", | ||
"jsdoc": "^3.6.7", | ||
"prettier": "^2.4.1", | ||
"rimraf": "^3.0.2", | ||
"shx": "^0.3.3", | ||
"typescript": "^4.3.5" | ||
"typescript": "^4.4.3" | ||
}, | ||
"dependencies": { | ||
"discord-akairo-message-util": "NotEnoughUpdates/discord-akairo-message-util", | ||
"discord-akairo-message-util": "npm:@notenoughupdates/discord-akairo-message-util@latest", | ||
"lodash": "^4.17.21", | ||
"source-map-support": "^0.5.19" | ||
"source-map-support": "^0.5.20" | ||
}, | ||
@@ -52,0 +52,0 @@ "scripts": { |
@@ -7,2 +7,3 @@ import { | ||
CommandInteraction, | ||
CommandInteractionOption, | ||
GuildApplicationCommandPermissionData, | ||
@@ -16,3 +17,2 @@ GuildResolvable, | ||
} from "discord.js"; | ||
import { ApplicationCommandOptionTypes } from "discord.js/typings/enums"; | ||
import _ from "lodash"; | ||
@@ -726,3 +726,4 @@ import { CommandHandlerEvents as CommandHandlerEventsType } from "../../typings/events"; | ||
} | ||
const convertedOptions: any = {}; | ||
const convertedOptions: ConvertedOptionsType = {}; | ||
if (interaction.options["_group"]) convertedOptions["subcommandGroup"] = interaction.options["_group"]; | ||
@@ -732,15 +733,6 @@ if (interaction.options["_subcommand"]) convertedOptions["subcommand"] = interaction.options["_subcommand"]; | ||
if (["SUB_COMMAND", "SUB_COMMAND_GROUP"].includes(option.type)) continue; | ||
convertedOptions[option.name] = interaction.options[ | ||
_.camelCase(`GET_${option.type as keyof ApplicationCommandOptionTypes}`) as | ||
| "getBoolean" | ||
| "getChannel" | ||
| "getString" | ||
| "getInteger" | ||
| "getNumber" | ||
| "getUser" | ||
| "getMember" | ||
| "getRole" | ||
| "getMentionable" | ||
| "getMessage" | ||
](option.name, false); | ||
convertedOptions[option.name] = interaction.options[_.camelCase(`GET_${option.type}`) as GetFunctions]( | ||
option.name, | ||
false | ||
); | ||
} | ||
@@ -1665,1 +1657,27 @@ | ||
export type PrefixSupplier = (message: Message) => string | string[] | Promise<string | string[]>; | ||
type GetFunctions = | ||
| "getBoolean" | ||
| "getChannel" | ||
| "getString" | ||
| "getInteger" | ||
| "getNumber" | ||
| "getUser" | ||
| "getMember" | ||
| "getRole" | ||
| "getMentionable" | ||
| "getMessage"; | ||
type ConvertedOptionsType = { | ||
[key: string]: | ||
| string | ||
| boolean | ||
| number | ||
| null | ||
| NonNullable<CommandInteractionOption["channel"]> | ||
| NonNullable<CommandInteractionOption["user"]> | ||
| NonNullable<CommandInteractionOption["member"]> | ||
| NonNullable<CommandInteractionOption["role"]> | ||
| NonNullable<CommandInteractionOption["member" | "role" | "user"]> | ||
| NonNullable<CommandInteractionOption["message"]>; | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1035441
12822
0
1