removes "-to" incase user expects it

This commit is contained in:
derpystuff 2023-02-16 15:21:59 +01:00
parent 175b104c97
commit 3d6233a0a7

View file

@ -24,6 +24,7 @@ module.exports = {
context.triggerTyping(); context.triggerTyping();
if(!args.to) args.to = "en" if(!args.to) args.to = "en"
if(args.to.startsWith("-to")) args.to = args.to.replace("-to ", "")
if(!isSupported(args.to)) return editOrReply(context, createEmbed("warning", context, "Invalid language (to).")) if(!isSupported(args.to)) return editOrReply(context, createEmbed("warning", context, "Invalid language (to)."))
if(!isSupported(args.from)) return editOrReply(context, createEmbed("warning", context, "Invalid language (from).")) if(!isSupported(args.from)) return editOrReply(context, createEmbed("warning", context, "Invalid language (from)."))