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

Method set

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

Source from the content-addressed store, hash-verified

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' });
40 return this.check(message, key, status) || message.sendLocale('COMMAND_CONF_UPDATED', [key, message.author.settings.resolveString(message, status.updated[0].piece)]);
41 }
42
43 async remove(message, [key, ...valueToRemove]) {
44 const status = await message.author.settings.update(key, valueToRemove.join(' '), message.guild, { avoidUnconfigurable: true, action: 'remove' });

Callers 2

runMethod · 0.45
_fetchCommandsMethod · 0.45

Calls 3

updateMethod · 0.80
joinMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected