useChat in server, ayun"boom" back

This commit is contained in:
ChomeNS 2023-03-01 19:51:24 +07:00
parent 2a56cff88b
commit 7cfeacdae3
3 changed files with 18 additions and 14 deletions

1
bot.js
View file

@ -25,6 +25,7 @@ async function createBot (server, config, getBots, setNewBot, dcclient, rl) {
version: config.version,
kaboom: server.kaboom,
logging: server.logging,
useChat: server.useChat,
checkTimeoutInterval: config.timeoutInterval,
hideErrors: true
}

View file

@ -16,8 +16,7 @@ module.exports = {
},
console: true,
chat: {
useChat: false,
messageLength: 100
messageLength: 128
},
core: {
layers: 3,
@ -77,32 +76,36 @@ module.exports = {
host: 'play.kaboom.pw',
port: 25565,
kaboom: true,
logging: true
logging: true,
useChat: false
},
{
host: 'sus.shhnowisnottheti.me',
port: 25565,
kaboom: false,
logging: true,
useChat: true
},
// R.I.P ayunboom
// {
// host: 'sus.shhnowisnottheti.me',
// port: 25565,
// kaboom: true,
// logging: true
// },
{
host: 'kitsune.icu',
port: 25565,
kaboom: true,
logging: false
logging: false,
useChat: false
},
{
host: 'play.chipmunk.land',
port: 25565,
kaboom: true,
logging: true
logging: true,
useChat: false
},
{
host: 'chayapak.chipmunk.land',
port: 25565,
kaboom: true,
logging: true
logging: true,
useChat: false
}
]
}

View file

@ -1,7 +1,7 @@
function inject (bot, dcclient, config) {
const ChatMessage = require('prismarine-chat')(bot.version)
bot.tellraw = function (selector, message) {
if (config.chat.useChat && selector === '@a') {
if (bot.options.useChat && selector === '@a') {
bot.chat(ChatMessage.fromNotch(message).toMotd().replaceAll('\xa7', '&'))
return
}