File Attachment Naming & Team Leader AutoJoin Fixes

This commit is contained in:
2025-11-23 13:47:26 -05:00
parent 758bef92c7
commit 83ba44fd2d
3 changed files with 18 additions and 4 deletions

View File

@@ -76,15 +76,17 @@ export default class WeeklyCommand extends BotCommand {
});
}
const safeSubject = subject.replace(/\s+/g, '_');
const embed = new EmbedBuilder()
.setTitle(`🎓 Weekly ${subject} Question (PhD Level)`)
.setDescription(`**Topic:** ${question.topic}\n**Difficulty:** ${question.difficulty_rating}`)
.setColor(0xfacc15)
.setImage(`attachment://weekly_${subject}.png`)
.setImage(`attachment://weekly_${safeSubject}.png`)
.setFooter({ text: `Resets at 12 AM Sunday` })
.setTimestamp();
const attachment = new AttachmentBuilder(imagePath, { name: `weekly_${subject}.png` });
const attachment = new AttachmentBuilder(imagePath, { name: `weekly_${safeSubject}.png` });
const row = new ActionRowBuilder<ButtonBuilder>()
.addComponents(