mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2025-02-17 06:40:17 -05:00
add config.version and more bot.version
This commit is contained in:
parent
c601677e42
commit
a195945d11
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
'version': '1.18.2',
|
||||
'prefixes': [
|
||||
'*',
|
||||
'cbot ',
|
||||
|
|
6
index.js
6
index.js
|
@ -99,7 +99,7 @@ function botThings() {
|
|||
username: process.argv[2] === 'mc.chomens41793.ga' ? 'ChomeNS_Bot' : randomstring.generate(16),
|
||||
host: process.argv[2],
|
||||
port: process.argv[3] ? Number(process.argv[3]) : 25565,
|
||||
version: '1.18.2',
|
||||
version: config.version,
|
||||
checkTimeoutInterval: '30000',
|
||||
keepAlive: false,
|
||||
hideErrors: true,
|
||||
|
@ -443,7 +443,7 @@ dcclient.on('ready', async () => {
|
|||
// Console COMMANDS
|
||||
rl.on('line', function(line) {
|
||||
try {
|
||||
const {MessageBuilder} = require('prismarine-chat')('1.18.2');
|
||||
const {MessageBuilder} = require('prismarine-chat')(bot.version);
|
||||
if (line.toLowerCase()==='' || line.toLowerCase().startsWith(' ')) return;
|
||||
if (line.toLowerCase()==='.exit' || line.toLowerCase()==='.end') {
|
||||
bot.emit('end', 'end command');
|
||||
|
@ -485,7 +485,7 @@ dcclient.on('ready', async () => {
|
|||
dcclient.on('messageCreate', async (message) => {
|
||||
// Ignore messages from the bot itself
|
||||
if (message.author.id === dcclient.user.id) return;
|
||||
const {MessageBuilder} = require('prismarine-chat')('1.18.2');
|
||||
const {MessageBuilder} = require('prismarine-chat')(bot.version);
|
||||
const channelid = message.channel.id;
|
||||
// if (message.content.toLowerCase().startsWith('!chomensmsg ')) {
|
||||
// bot.core.run(`minecraft:tellraw @a ["",{"text":"[","color":"dark_gray"},{"text":"ChomeNS ","color":"yellow","clickEvent":{"action":"open_url","value":"https://discord.gg/xdgCkUyaA4"},"hoverEvent":{"action":"show_text","contents":[{"text":"https://discord.gg/xdgCkUyaA4 ","color":"blue"},{"text":"<-- join now","color":"red"}]}},{"text":"Discord","color":"blue","clickEvent":{"action":"open_url","value":"https://discord.gg/xdgCkUyaA4"},"hoverEvent":{"action":"show_text","contents":[{"text":"https://discord.gg/xdgCkUyaA4 ","color":"blue"},{"text":"<-- join now","color":"red"}]}},{"text":" (ChomeNS Channel)","color":"gray"},{"text":"] ","color":"dark_gray"},{"text":"${message.member.displayName}","color":"red","clickEvent":{"action":"copy_to_clipboard","value":"${message.author.username}#${message.author.discriminator}"},"hoverEvent":{"action":"show_text","value":{"text":"${message.author.username}§7#${message.author.discriminator}"} }},{"text":" ","color":"white"},` + MessageBuilder.fromString('&7' + message.content.substring(12)) + ']');
|
||||
|
|
Loading…
Reference in a new issue