function translate(
  guildId,
  key,
  options,
) {
  const guild = cache.guilds.get(guildId);
  const language = bot.guildLanguages.get(guildId) || guild?.preferredLocale ||
    "en_US";
  // undefined is silly bug cause i18next dont have proper typings
  const languageMap = i18next.getFixedT(language, undefined) ||
    i18next.getFixedT("en_US", undefined);
  return languageMap(key, options);
}
/** This function helps translate the string to the specific guilds needs. */
This function helps translate the string to the specific guilds needs.
This function helps translate the string to the specific guilds needs .
function translate(
  guildId,
  key,
  options,
) {
  const guild = cache.guilds.get(guildId);
  const language = bot.guildLanguages.get(guildId) || guild?.preferredLocale ||
    "en_US";
  const languageMap = i18next.getFixedT(language, undefined) ||
    i18next.getFixedT("en_US", undefined);
  return languageMap(key, options);
}
function translate ( guildId , key , options , ) { const guild = cache . guilds . get ( guildId ) ; const language = bot . guildLanguages . get ( guildId ) || guild ?. preferredLocale || "en_US" ; const languageMap = i18next . getFixedT ( language , undefined ) || i18next . getFixedT ( "en_US" , undefined ) ; return languageMap ( key , options ) ; }
This function helps translate the string to the specific guilds needs.
This function helps translate the string to the specific guilds needs .
// undefined is silly bug cause i18next dont have proper typings