mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-02 07:05:39 -05:00
Update commands/translate.js
This commit is contained in:
@@ -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.CorelessMode){
|
||||
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.CorelessMode){
|
||||
bot.chat(ChatMessage.fromNotch({ text: e.toString(), color: 'red' }).toMotd().replaceAll('§', '&'))
|
||||
}else{
|
||||
source.sendFeedback({ text: e, color: 'red' })
|
||||
|
||||
Reference in New Issue
Block a user