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

Method show

src/commands/Admin/conf.js:29–39  ·  view source on GitHub ↗
(message, [key])

Source from the content-addressed store, hash-verified

27 }
28
29 show(message, [key]) {
30 const entry = this.getPath(key);
31 if (!entry || (entry.type === 'Folder' ? !entry.configurableKeys.length : !entry.configurable)) return message.sendLocale('COMMAND_CONF_GET_NOEXT', [key]);
32 if (entry.type === 'Folder') {
33 return message.sendLocale('COMMAND_CONF_SERVER', [
34 key ? `: ${key.split('.').map(toTitleCase).join('/')}` : '',
35 codeBlock('asciidoc', message.guild.settings.display(message, entry))
36 ]);
37 }
38 return message.sendLocale('COMMAND_CONF_GET', [entry.path, message.guild.settings.display(message, entry)]);
39 }
40
41 async set(message, [key, valueToSet]) {
42 const entry = this.check(message, key, await message.guild.settings.update(key, valueToSet, { onlyConfigurable: true, arrayAction: 'add' }));

Callers

nothing calls this directly

Calls 2

getPathMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected