mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 23:23:08 -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
|
@ -40,6 +40,9 @@ module.exports = {
|
||||||
args.to = getCodeFromAny(args.to)
|
args.to = getCodeFromAny(args.to)
|
||||||
args.from = getCodeFromAny(args.from)
|
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{
|
try{
|
||||||
let translate = await googleTranslate(context, content, args.to, args.from)
|
let translate = await googleTranslate(context, content, args.to, args.from)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue