Update commands/translate.js
This commit is contained in:
parent
06746a210b
commit
d1d4a44a62
1 changed files with 2 additions and 2 deletions
|
@ -16,13 +16,13 @@ const bot = context.bot
|
|||
const ChatMessage = require('prismarine-chat')(bot.options.version)
|
||||
try {
|
||||
const res = await translate(args.slice(2).join(' '), { from: args.slice(1).join(' '), to: args[1] })
|
||||
if(bot.options.Core.CorelessMode){
|
||||
if(!bot.options.Core.enabled){
|
||||
bot.chat(ChatMessage.fromNotch([{ text: 'Result: ', color: 'gold' }, { text: res.text, color: 'green' }]).toMotd().replaceAll('§', '&'))
|
||||
}else{
|
||||
bot.tellraw([{ text: 'Result: ', color: 'gold' }, { text: res.text, color: 'green' }])
|
||||
}
|
||||
} catch (e) {
|
||||
if (bot.options.Core.CorelessMode){
|
||||
if (!bot.options.Core.enabled){
|
||||
bot.chat(ChatMessage.fromNotch({ text: e.toString(), color: 'red' }).toMotd().replaceAll('§', '&'))
|
||||
}else{
|
||||
source.sendFeedback({ text: e, color: 'red' })
|
||||
|
|
Loading…
Reference in a new issue