From 6ffa1bae9a502d3bf52a71ed1b7a6f3d989b4abe Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 27 Aug 2021 15:42:31 -0400 Subject: I think I am loosing my mind --- src/commands/config/settings.ts | 21 ++++++++++++++++----- src/commands/info/avatar.ts | 5 ++++- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/commands/config/settings.ts b/src/commands/config/settings.ts index c28b4dd..a8070e2 100644 --- a/src/commands/config/settings.ts +++ b/src/commands/config/settings.ts @@ -23,10 +23,15 @@ export default class SettingsCommand extends BushCommand { slashOptions: settingsArr.map((setting) => { return { name: util.camelToSnakeCase(setting), - description: `Set the server's ${guildSettingsObj[setting].name.toLowerCase()}`, - type: /* guildSettingsObj[setting].type.includes('-array') ? */ 'SUB_COMMAND_GROUP' /* : 'SUB_COMMAND' */, + description: `Manage the server's ${guildSettingsObj[setting].name.toLowerCase()}`, + type: 'SUB_COMMAND_GROUP', options: guildSettingsObj[setting].type.includes('-array') ? [ + { + name: 'view', + description: `View the server's ${guildSettingsObj[setting].name.toLowerCase()}.`, + type: 'SUB_COMMAND' + }, { name: 'add', description: `Add a value to the server's ${guildSettingsObj[setting].name.toLowerCase()}.`, @@ -59,6 +64,11 @@ export default class SettingsCommand extends BushCommand { } ] : [ + { + name: 'view', + description: `View the server's ${guildSettingsObj[setting].name.toLowerCase()}.`, + type: 'SUB_COMMAND' + }, { name: 'set', description: `Set the server's ${guildSettingsObj[setting].name.toLowerCase()}.`, @@ -77,7 +87,7 @@ export default class SettingsCommand extends BushCommand { ] }; }), - slashGuilds: ['516977525906341928'], + slashGuilds: ['516977525906341928', '812400566235430912'], channel: 'guild', clientPermissions: ['SEND_MESSAGES'], userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'], @@ -87,8 +97,9 @@ export default class SettingsCommand extends BushCommand { // *args(): any {} - public override async exec(message: BushMessage | BushSlashMessage): Promise { - client.console.debug(message.interaction, 6); + public override async exec(message: BushMessage | BushSlashMessage, args: unknown): Promise { + client.console.debugRaw(message.interaction); + client.console.debugRaw(args); if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be used in servers.`); const messageOptions = await this.generateMessageOptions(message); const msg = (await message.util.reply(messageOptions)) as Message; diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts index 7654d2f..33393b8 100644 --- a/src/commands/info/avatar.ts +++ b/src/commands/info/avatar.ts @@ -1,4 +1,4 @@ -import { MessageEmbed, User } from 'discord.js'; +import { CommandInteraction, MessageEmbed, User } from 'discord.js'; import { BushCommand, BushMessage, BushSlashMessage } from '../../lib'; export default class AvatarCommand extends BushCommand { @@ -36,6 +36,9 @@ export default class AvatarCommand extends BushCommand { } override async exec(message: BushMessage | BushSlashMessage, args: { user: User }): Promise { + client.console.debugRaw(args); + client.console.debugRaw(message.interaction); + client.console.debugRaw((message.interaction as CommandInteraction).options.getUser('user')); const user = args.user ?? message.author; const embed = new MessageEmbed() -- cgit