diff --git a/discordlib/chatter.js b/discordlib/chatter.js index 6a33a33..27552f4 100644 --- a/discordlib/chatter.js +++ b/discordlib/chatter.js @@ -4,17 +4,21 @@ exports.sass = function(input) { exports.summon = function(input, message) { //TODO Consider a ring of :fire: and actually tagging summoned user - if (message.mentions.users && message.mentions.users.size > 0) { - let targetToSummon = message.mentions.users.first() - let response = `your wish is my command. - COME FORTH ${targetToSummon}! \`\`\` + if (message.mentions.users) { + if (message.mentions.users.size == 1) { + let summoned = message.mentions.members.first() + // The summon circle is 32 chars wide, 16 is the mid point + let padding = ' '.repeat(18 - (summoned.displayName.length / 2)) + return `your wish is my command... + +COME FORTH ${summoned}! \`\`\` %%% %%% %%% %%% %%% %%% %%% %%% - ${targetToSummon.nickname} +${padding + summoned.displayName} %%% %%% %%% %%% @@ -22,7 +26,7 @@ exports.summon = function(input, message) { %%% %%% %%% %%%\`\`\`` - return response + } } return "you can't just summon nothing, that's not how this works!" } \ No newline at end of file