File Attachment Naming & Team Leader AutoJoin Fixes
This commit is contained in:
@@ -76,15 +76,17 @@ export default class DailyCommand extends BotCommand {
|
||||
});
|
||||
}
|
||||
|
||||
const safeSubject = subject.replace(/\s+/g, '_');
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle(`📅 Daily ${subject} Question`)
|
||||
.setDescription(`**Topic:** ${question.topic}\n**Difficulty:** ${question.difficulty_rating}`)
|
||||
.setColor(0x60a5fa)
|
||||
.setImage(`attachment://daily_${subject}.png`)
|
||||
.setImage(`attachment://daily_${safeSubject}.png`)
|
||||
.setFooter({ text: `Resets at 12 AM local time` })
|
||||
.setTimestamp();
|
||||
|
||||
const attachment = new AttachmentBuilder(imagePath, { name: `daily_${subject}.png` });
|
||||
const attachment = new AttachmentBuilder(imagePath, { name: `daily_${safeSubject}.png` });
|
||||
|
||||
const row = new ActionRowBuilder<ButtonBuilder>()
|
||||
.addComponents(
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user