| 24 | } |
| 25 | |
| 26 | show(message, [key]) { |
| 27 | const path = this.client.gateways.users.getPath(key, { avoidUnconfigurable: true, errors: false, piece: null }); |
| 28 | if (!path) return message.sendLocale('COMMAND_CONF_GET_NOEXT', [key]); |
| 29 | if (path.piece.type === 'Folder') { |
| 30 | return message.sendLocale('COMMAND_CONF_USER', [ |
| 31 | key ? `: ${key.split('.').map(toTitleCase).join('/')}` : '', |
| 32 | codeBlock('asciidoc', message.author.settings.list(message, path.piece)) |
| 33 | ]); |
| 34 | } |
| 35 | return message.sendLocale('COMMAND_CONF_GET', [path.piece.path, message.author.settings.resolveString(message, path.piece)]); |
| 36 | } |
| 37 | |
| 38 | async set(message, [key, ...valueToSet]) { |
| 39 | const status = await message.author.settings.update(key, valueToSet.join(' '), message.guild, { avoidUnconfigurable: true, action: 'add' }); |