const { TRANSLATE_LANGUAGES, TRANSLATE_DEFAULT_LANGUAGE_LIST } = require("#constants"); const { getLanguagesFromAny } = require("#utils/translate"); module.exports = async (context)=>{ let choices = []; if(context.value){ choices = getLanguagesFromAny(context.value) } else { // Default language suggestions choices = TRANSLATE_DEFAULT_LANGUAGE_LIST } return context.respond({ choices: choices.splice(0, 20).map((l)=>({ name: TRANSLATE_LANGUAGES[l], value: l }))}); }