@easy-ds-bot/framework
Advanced tools
@@ -41,2 +41,11 @@ "use strict"; | ||
| function getMenu(roles) { | ||
| let options = loader.commandHelp.getCommandNames(roles).map(command => ({ | ||
| label: (loader.commandHelp.commandTypes.get(command) == "slash" ? '/' : loader.commandHelp.commandTypes.get(command) == "nonPrefixed" ? '' : config.prefix) + command, | ||
| description: loader.commandHelp.descriptions.get(command)?.slice(0, 100), | ||
| value: command, | ||
| emoji: config.builtinCommandsSettings?.helpPageMenuEmoji, | ||
| default: false | ||
| })); | ||
| if (options.length > 25) | ||
| options = options.slice(0, 26); | ||
| const components = [{ | ||
@@ -47,9 +56,3 @@ type: discord_js_1.ComponentType.ActionRow, | ||
| customId: "help $$ commandSelect", | ||
| options: loader.commandHelp.getCommandNames(roles).map(command => ({ | ||
| label: (loader.commandHelp.commandTypes.get(command) == "slash" ? '/' : loader.commandHelp.commandTypes.get(command) == "nonPrefixed" ? '' : config.prefix) + command, | ||
| description: loader.commandHelp.descriptions.get(command)?.slice(0, 100), | ||
| value: command, | ||
| emoji: config.builtinCommandsSettings?.helpPageMenuEmoji, | ||
| default: false | ||
| })) | ||
| options | ||
| }] | ||
@@ -56,0 +59,0 @@ }]; |
+1
-1
@@ -21,3 +21,3 @@ { | ||
| "name": "@easy-ds-bot/framework", | ||
| "version": "2.1.0", | ||
| "version": "2.1.1", | ||
| "description": "Simply TypeScript framework for your discord.js bot", | ||
@@ -24,0 +24,0 @@ "main": "dist/index.js", |
2048
0.15%89966
-0.01%