MCPcopy Create free account
hub / github.com/RTByte/rtbyte / show

Method show

src/commands/User/userconf.js:26–36  ·  view source on GitHub ↗
(message, [key])

Source from the content-addressed store, hash-verified

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' });

Callers

nothing calls this directly

Calls 3

getPathMethod · 0.80
joinMethod · 0.80
listMethod · 0.45

Tested by

no test coverage detected