mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 15:13:04 -04:00
fix error on unknown language flag
This commit is contained in:
parent
b837460b33
commit
c2ec17e1d7
2 changed files with 4 additions and 1 deletions
|
@ -39,6 +39,9 @@ module.exports = {
|
|||
|
||||
args.to = getCodeFromAny(args.to)
|
||||
args.from = getCodeFromAny(args.from)
|
||||
|
||||
if(!args.to) return editOrReply(context, createEmbed("warning", context, "Invalid language (to)."))
|
||||
if(!args.from) return editOrReply(context, createEmbed("warning", context, "Invalid language (from)."))
|
||||
|
||||
try{
|
||||
let translate = await googleTranslate(context, content, args.to, args.from)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue