cache char nicknames when added by tag

master
Kit Kasune 3 years ago
parent 1242df6c25
commit eb99fce669
  1. 4
      .idea/workspace.xml
  2. 1
      commands/anime/char.js

@ -4,9 +4,9 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="826c705b-a7fa-4ece-b82a-e278fca7d494" name="Changes" comment="marriage declining"> <list default="true" id="826c705b-a7fa-4ece-b82a-e278fca7d494" name="Changes" comment="stats without leveling enabled">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/commands/leveling/stats.js" beforeDir="false" afterPath="$PROJECT_DIR$/commands/leveling/stats.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/commands/anime/char.js" beforeDir="false" afterPath="$PROJECT_DIR$/commands/anime/char.js" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

@ -197,6 +197,7 @@ module.exports = {
amEmbed.addField("Reviewed", `Reviewed and submitted by <@${message.author.id}>`); amEmbed.addField("Reviewed", `Reviewed and submitted by <@${message.author.id}>`);
client.misc.cache.chars.set(options.name, options.id); client.misc.cache.chars.set(options.name, options.id);
client.misc.cache.charsID.set(options.id, options.name); client.misc.cache.charsID.set(options.id, options.name);
if (options.nicknames) {options.nicknames.forEach(nn => client.misc.cache.chars.set(nn, options.id));}
} }
else {amEmbed.addField("ID", options.id);} else {amEmbed.addField("ID", options.id);}
amEmbed.setAuthor({name: !queue ? "Character Added" : "Character Submitted", iconURL: message.author.displayAvatarURL()}); amEmbed.setAuthor({name: !queue ? "Character Added" : "Character Submitted", iconURL: message.author.displayAvatarURL()});

Loading…
Cancel
Save