maybe without debug logs

This commit is contained in:
bignutty 2024-11-05 23:56:32 +01:00
parent 28af9c5cb5
commit 13e2437b69

View file

@ -40,7 +40,6 @@ module.exports = {
run: async (ctx) => {
try{
console.log("translating")
if (ctx.userId !== context.userId) return await ctx.respond(InteractionCallbackTypes.DEFERRED_UPDATE_MESSAGE);
let translate = await googleTranslate(context, message.content, ctx.data.values[0], "auto")
@ -52,8 +51,6 @@ module.exports = {
components.components[0].components[0].options[i].default = (components.components[0].components[0].options[i].value === ctx.data.values[0])
}
console.log("translated")
await ctx.editOrRespond({
embeds: [{
description: `${icon("locale")} ${fromFlag} ${pill(TRANSLATE_LANGUAGES[translate.response.body.language.from || sourceLanguage] || translate.response.body.language.from || args.from)} ${icon("arrow_right")} ${toFlag} ${pill(TRANSLATE_LANGUAGES[translate.response.body.language.to] || translate.response.body.language.to)}\n${codeblock("ansi", [translate.response.body.translation])}`,