Skip to content

Commit

Permalink
Merge branch 'fix-locale-issue' into 'main'
Browse files Browse the repository at this point in the history
Fix locale issue

See merge request jeddai/joyeuse!8
  • Loading branch information
jeddai committed May 1, 2022
2 parents 972cc2e + 2952217 commit ebde3e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/commands/schedule-event-handlers/raid-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export const handleRaidCreate = async (interaction: CommandInteraction) => {
let raidName = interaction.options.getString(OPTION_RAID_NAME);
const { name, shortName, description, color, vaulted, imageUrls } = getRaid(raidName);

const locale = getLocale(isValidLocale(interaction.options.getString(OPTION_LOCALE)) || interaction.locale as LocaleString);
const localeString = (isValidLocale(interaction.options.getString(OPTION_LOCALE)) || interaction.locale) as LocaleString
const locale = getLocale(localeString);
const { responses, content, actions } = locale.commands.schedule.raid;
const localizedName = locale.raids[shortName]?.name;
const localizedDescription = locale.raids[shortName]?.description;
Expand Down Expand Up @@ -206,7 +207,7 @@ export const handleRaidCreate = async (interaction: CommandInteraction) => {
canTeach,
teachingRun,
date,
locale: interaction.locale
locale: localeString
}
const store = await RaidStore.set(`${interaction.guild?.id}:${sentEmbed.id}`, details);
if (!store) {
Expand Down

0 comments on commit ebde3e1

Please sign in to comment.