diff --git a/src/constants.js b/src/constants.js index 7d0668f..91330e6 100644 --- a/src/constants.js +++ b/src/constants.js @@ -39,6 +39,7 @@ ${error.toString()} \`\`\` If this issue persists please report it here: \ `, + aboutMessage: (guildCount) => `\ A discord bot for metaphorically "rolling dice"/generating random values. Made for use with Weaverdice systems. diff --git a/src/index.js b/src/index.js index 1a10bfd..52baf5f 100644 --- a/src/index.js +++ b/src/index.js @@ -203,7 +203,7 @@ const registerMacroCommands = async guildId => { for await (let [ name, dice ] of macros.iterator() ) commands.push({ name, - description: "Roll " + dice.replaceAll('\n', ';') + description: elipsify("Roll " + dice.replaceAll('\n', ';'), 100) }) await rest.put( @@ -212,6 +212,9 @@ const registerMacroCommands = async guildId => { ) } +const elipsify = (string, maxLength) => + string.length > maxLength ? string.slice(0, maxLength - 3) + '...' : string + const pruneDB = async () => { let validIds = [] @@ -291,7 +294,6 @@ addCommand( // return // } - await interaction.deferReply() let macros = openMacros(interaction.guild.id)