uniform naming
This commit is contained in:
parent
ffa92bbd5f
commit
43e7eba319
1 changed files with 9 additions and 9 deletions
|
@ -174,7 +174,7 @@ export default {
|
|||
// Use the cli because we already have enough data
|
||||
return newReminder(client, time, {
|
||||
locale: interaction.locale,
|
||||
message: interaction.options.getString(loc_default?.get('c_reminder_sub1_opt2_name') as string),
|
||||
message: interaction.options.getString(loc_default?.get(`c_${filename}_sub1_opt2_name`) as string),
|
||||
createdAt: interaction.createdAt.getTime(),
|
||||
channelId: interaction.channelId,
|
||||
userId: interaction.user.id,
|
||||
|
@ -187,20 +187,20 @@ export default {
|
|||
// Show modal to user to get at least the time
|
||||
const modal = new ModalBuilder()
|
||||
.setCustomId('reminderGUI')
|
||||
.setTitle(loc.get('c_reminder_name').capitalize());
|
||||
.setTitle(loc.get(`c_${filename}_name`).capitalize());
|
||||
|
||||
const timeGUI = new TextInputBuilder()
|
||||
.setCustomId('reminderGUI-time')
|
||||
.setLabel(loc.get('c_reminder_sub1_opt1_name').capitalize())
|
||||
.setLabel(loc.get(`c_${filename}_sub1_opt1_name`).capitalize())
|
||||
.setStyle(TextInputStyle.Short)
|
||||
.setPlaceholder('1h')
|
||||
.setRequired(true);
|
||||
|
||||
const messageGUI = new TextInputBuilder()
|
||||
.setCustomId('reminderGUI-message')
|
||||
.setLabel(loc.get('c_reminder_sub1_opt2_name').capitalize())
|
||||
.setLabel(loc.get(`c_${filename}_sub1_opt2_name`).capitalize())
|
||||
.setStyle(TextInputStyle.Paragraph)
|
||||
.setPlaceholder(loc.get('c_reminder_sub1_opt2_desc'))
|
||||
.setPlaceholder(loc.get(`c_${filename}_sub1_opt2_desc`))
|
||||
.setRequired(false);
|
||||
|
||||
modal.addComponents(
|
||||
|
@ -229,12 +229,12 @@ export default {
|
|||
.addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId(idPrec)
|
||||
.setLabel(loc.get('c_reminder12'))
|
||||
.setLabel(loc.get(`c_${filename}12`))
|
||||
.setStyle(ButtonStyle.Primary))
|
||||
.addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId(idNext)
|
||||
.setLabel(loc.get('c_reminder13'))
|
||||
.setLabel(loc.get(`c_${filename}13`))
|
||||
.setStyle(ButtonStyle.Primary),
|
||||
);
|
||||
|
||||
|
@ -249,12 +249,12 @@ export default {
|
|||
?.toLowerCase() ?? '': {
|
||||
const id = interaction.options.getInteger(loc_default?.get(`c_${filename}_sub3_opt1_name`) as string);
|
||||
if (id === null) {
|
||||
return interaction.reply({ content: loc.get('c_reminder2'), ephemeral: true });
|
||||
return interaction.reply({ content: loc.get(`c_${filename}2`), ephemeral: true });
|
||||
}
|
||||
|
||||
// Check if the ID exists and belongs to the user
|
||||
if (await checkOwnershipReminder(client, id, interaction.user.id, interaction.guildId ?? '0')) {
|
||||
return interaction.reply({ content: loc.get('c_reminder3'), ephemeral: true });
|
||||
return interaction.reply({ content: loc.get(`c_${filename}3`), ephemeral: true });
|
||||
}
|
||||
|
||||
// Stop timeout
|
||||
|
|
Loading…
Reference in a new issue