mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
fix edge case with translate
This commit is contained in:
parent
1d81ee14ca
commit
83a4e77166
2 changed files with 5 additions and 2 deletions
|
@ -156,7 +156,10 @@ module.exports = {
|
|||
if(context.message.messageReference) {
|
||||
try{
|
||||
// Quick language shortcut - lc.tr de
|
||||
if(args.text.length >= 1 && getCodeFromAny(args.text)) args.to = args.text;
|
||||
if(args.text.length >= 1 && getCodeFromAny(args.text) !== undefined) args.to = args.text;
|
||||
|
||||
if(!isSupported(args.to)) return editOrReply(context, createEmbed("warning", context, `Invalid target language (${stringwrap(args.to, 10, false)}).`))
|
||||
|
||||
let targetLanguage = getCodeFromAny(args.to)
|
||||
|
||||
let message = await context.message.channel.fetchMessage(context.message.messageReference.messageId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue