diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-26 17:17:20 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-26 17:17:20 -0400 |
| commit | 598e23ab48f29e13b490ac15acc6f7bbe3671028 (patch) | |
| tree | 52b1c64cae46c60b64c4ba0bd74fd3a5d85a87c7 /bot/src/commands/suggest.js | |
| parent | bc64422fdf34e512509cfc931569715828047c24 (diff) | |
| download | AleeBot-598e23ab48f29e13b490ac15acc6f7bbe3671028.tar.gz AleeBot-598e23ab48f29e13b490ac15acc6f7bbe3671028.tar.bz2 AleeBot-598e23ab48f29e13b490ac15acc6f7bbe3671028.zip | |
Fixed length issue for suggest guilds
Diffstat (limited to 'bot/src/commands/suggest.js')
| -rw-r--r-- | bot/src/commands/suggest.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/src/commands/suggest.js b/bot/src/commands/suggest.js index b8b164b..6c3209f 100644 --- a/bot/src/commands/suggest.js +++ b/bot/src/commands/suggest.js @@ -67,11 +67,14 @@ export default { if (interaction.options.getSubcommand() === 'guild') { if (!interaction.guild) return await interaction.reply({ content: 'This command can only be run in a guild.' }); const guildSetting = await guildSettings.findOne({ where: { guildID: interaction.guild.id } }); - if (!guildSetting || !guildSetting.suggestionsChannelID) return await interaction.reply({ content: 'This server did not configure to have suggestions enabled.' }); + if (!guildSetting || !guildSetting.suggestionsChannelID) return await interaction.reply({ content: 'This server did not configure to have suggestions enabled.', flags: MessageFlags.Ephemeral }); + + let guildName = interaction.guild.name; + if (guildName.length >= 44) guildName = 'this server'; const modal = new ModalBuilder() .setCustomId(`suggest-${interaction.user.id}`) - .setTitle(`Suggestion for ${interaction.guild.name}`); + .setTitle(`Suggestion for ${guildName}`); const featureText = new TextInputBuilder() .setCustomId('feature') |
