All files / src/commands translate.ts

0% Statements 0/2
100% Branches 0/0
100% Functions 0/0
0% Lines 0/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58                                                                                                                   
/**
 * @copyright nhcarrigan
 * @license Naomi's Public License
 * @author Naomi Carrigan
 */
 
import {
  ApplicationCommandType,
  ApplicationIntegrationType,
  ContextMenuCommandBuilder,
  InteractionContextType,
  Locale,
} from "discord.js";
 
const command = new ContextMenuCommandBuilder().
  setContexts(
    InteractionContextType.BotDM,
    InteractionContextType.Guild,
    InteractionContextType.PrivateChannel,
  ).
  setIntegrationTypes(ApplicationIntegrationType.UserInstall).
  setType(ApplicationCommandType.Message).
  setName("Translate Message").
  setNameLocalizations({
    [Locale.Indonesian]:   "Terjemahkan Pesan",
    [Locale.EnglishGB]:    "Translate Message",
    [Locale.EnglishUS]:    "Translate Message",
    [Locale.Bulgarian]:    "Предаване на съобщение",
    [Locale.ChineseCN]:    "翻译信件",
    [Locale.ChineseTW]:    "翻譯訊息",
    [Locale.Czech]:        "Přeložit zprávu",
    [Locale.Danish]:       "Oversæt brev",
    [Locale.Dutch]:        "Bericht vertalen",
    [Locale.Finnish]:      "Käännä viesti",
    [Locale.French]:       "Traduire le message",
    [Locale.German]:       "Nachricht übersetzen",
    [Locale.Greek]:        "Μετάφραση μηνύματος",
    [Locale.Hindi]:        "संदेश अनुवाद",
    [Locale.Hungarian]:    "Üzenet fordítása",
    [Locale.Italian]:      "Traduci il messaggio",
    [Locale.Japanese]:     "メッセージの翻訳",
    [Locale.Korean]:       "자주 묻는 질문",
    [Locale.Lithuanian]:   "Tulkot ziņojumu",
    [Locale.Polish]:       "Przetłumacz wiadomość",
    [Locale.PortugueseBR]: "Traduzir mensagem",
    [Locale.Romanian]:     "Tradu mesajul",
    [Locale.Russian]:      "Перевод сообщения",
    [Locale.SpanishES]:    "Traducir mensaje",
    [Locale.SpanishLATAM]: "Traducir mensaje",
    [Locale.Swedish]:      "Översätt meddelande",
    [Locale.Thai]:         "แปลจดหมาย",
    [Locale.Turkish]:      "Mesajı Çevir",
    [Locale.Ukrainian]:    "Переклади",
  });
 
// eslint-disable-next-line no-console -- We don't need our logger here as this never runs in production.
console.log(JSON.stringify(command.toJSON()));