aboutsummaryrefslogtreecommitdiff
path: root/bot/src/commands
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-26 17:17:20 -0400
committerAndrew Lee <andrew@alee14.me>2025-03-26 17:17:20 -0400
commit598e23ab48f29e13b490ac15acc6f7bbe3671028 (patch)
tree52b1c64cae46c60b64c4ba0bd74fd3a5d85a87c7 /bot/src/commands
parentbc64422fdf34e512509cfc931569715828047c24 (diff)
downloadAleeBot-598e23ab48f29e13b490ac15acc6f7bbe3671028.tar.gz
AleeBot-598e23ab48f29e13b490ac15acc6f7bbe3671028.tar.bz2
AleeBot-598e23ab48f29e13b490ac15acc6f7bbe3671028.zip
Fixed length issue for suggest guilds
Diffstat (limited to 'bot/src/commands')
-rw-r--r--bot/src/commands/suggest.js7
-rw-r--r--bot/src/commands/timer.js2
2 files changed, 6 insertions, 3 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')
diff --git a/bot/src/commands/timer.js b/bot/src/commands/timer.js
index c86fd20..590fa40 100644
--- a/bot/src/commands/timer.js
+++ b/bot/src/commands/timer.js
@@ -35,7 +35,7 @@ export default {
const date = new Date();
date.setSeconds(date.getSeconds() + timer);
const timeString = time(date, TimestampStyles.RelativeTime);
- await interaction.reply(`Timer set! Will remind you ${timeString}`);
+ await interaction.reply(`Timer set! Will remind you ${timeString}.`);
}
setTimeout(async function(){