mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 07:38:00 -05:00
move useChat in tellraw plugin + remove unused eslint comment thingy
This commit is contained in:
parent
9986dd31ed
commit
5b299d536a
61 changed files with 24 additions and 85 deletions
1
bot.js
1
bot.js
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
|
||||
const mc = require('minecraft-protocol')
|
||||
const crypto = require('crypto')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'ayunsudo',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'botuser',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'botvisibility',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'bruhify',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'cb',
|
||||
alias: ['cmd', 'commandblock', 'run'],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const changelog = require('../changelog.json')
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
|
||||
module.exports = {
|
||||
name: 'clearchat',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'clearchatqueue',
|
||||
description: 'Clears the bot\'s chat queue',
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
function add (command, interval, bot) {
|
||||
const id = setInterval(() => bot.core.run(command), interval)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const cowsay = require('cowsay2')
|
||||
const cows = require('cowsay2/cows')
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const sleep = require('sleep-promise')
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'creator',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'discord',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { resize } = require('../util/image')
|
||||
const axios = require('axios')
|
||||
const sharp = require('sharp')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'eaglercrash',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'echo',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'end',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'entity',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
const { VM } = require('vm2')
|
||||
const axios = require('axios')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'executebypass',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'gamemodeall',
|
||||
alias: [],
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
|
||||
/* eslint-disable no-var */
|
||||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'help',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable no-case-declarations */
|
||||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
|
||||
const fs = require('fs/promises')
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
const path = require('path')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'netmsg',
|
||||
alias: ['networkmessage', 'irc'],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { between } = require('../util/between')
|
||||
module.exports = {
|
||||
name: 'rtp',
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable no-eval */
|
||||
/* eslint-disable max-len */
|
||||
const util = require('util')
|
||||
const { stylize } = require('../util/colors/minecraft')
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'test',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
const moment = require('moment-timezone')
|
||||
module.exports = {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'tpall',
|
||||
alias: [],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
const translate = require('@vitalets/google-translate-api')
|
||||
module.exports = {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
const { secondsToHms } = require('../util/secondToHms')
|
||||
module.exports = {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const urban = require('urban-dictionary')
|
||||
module.exports = {
|
||||
name: 'urban',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'uuid',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
name: 'validate',
|
||||
description: 'Validates hash',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const wiki = require('wikipedia')
|
||||
const util = require('util')
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
module.exports = {
|
||||
version: '1.18.2',
|
||||
prefixes: [
|
||||
|
|
1
index.js
1
index.js
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const readline = require('node:readline')
|
||||
const { stdin: input, stdout: output } = require('node:process')
|
||||
const rl = readline.createInterface({ input, output })
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable max-len */
|
||||
/* eslint-disable require-jsdoc */
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
// const parse = require('../util/text_parser');
|
||||
const { containsIllegalCharacters } = require('../util/containsIllegalCharacters')
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
|
||||
const path = require('path')
|
||||
const { MessageEmbed } = require('discord.js')
|
||||
function inject (bot, dcclient, config) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable no-eval */
|
||||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
|
||||
const moment = require('moment-timezone')
|
||||
const util = require('util')
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable max-len */
|
||||
/* eslint-disable require-jsdoc */
|
||||
|
||||
const nbt = require('prismarine-nbt')
|
||||
const Vec3 = require('vec3')
|
||||
|
||||
|
@ -7,22 +6,12 @@ const relativePosition = new Vec3(0, 0, 0)
|
|||
|
||||
function inject (bot, dcclient, config) {
|
||||
const mcData = require('minecraft-data')(bot.version)
|
||||
const chatMessage = require('prismarine-chat')(bot.version)
|
||||
const core = {
|
||||
isCore (position) {
|
||||
return position.x >= core.start.x && position.x <= core.end.x && position.y >= core.start.y && position.y <= core.end.y && position.z >= core.start.z && position.z <= core.end.z
|
||||
},
|
||||
run (command) {
|
||||
try {
|
||||
if (config.chat.useChat &&
|
||||
command.startsWith('minecraft:tellraw @a ') &&
|
||||
!command.includes('Console') &&
|
||||
!command.includes('Discord')
|
||||
) {
|
||||
bot.chat(chatMessage.fromNotch(command.replace('minecraft:tellraw @a ', '')).toMotd().replaceAll('\xa7', '&'))
|
||||
return
|
||||
}
|
||||
|
||||
relativePosition.x++
|
||||
|
||||
if (relativePosition.x >= 16) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
|
||||
const { escapeMarkdown } = require('../util/escapeMarkdown')
|
||||
async function inject (bot, dcclient, config) {
|
||||
const chatMessage = require('prismarine-chat')(bot.version)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const convert = require('color-convert')
|
||||
|
||||
// eslint-disable-next-line require-jsdoc
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const crypto = require('crypto')
|
||||
module.exports = {
|
||||
inject: function (bot, dcclient, config) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
|
||||
const { Midi } = require('@tonejs/midi')
|
||||
const { convertMidi } = require('../util/midi_converter')
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable max-len */
|
||||
/* eslint-disable require-jsdoc */
|
||||
|
||||
class PlayerList {
|
||||
list = []
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
|
||||
function inject (bot) {
|
||||
bot.position = { x: 0, y: 0, z: 0 }
|
||||
bot._client.on('position', (position) => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
|
||||
const util = require('util')
|
||||
const mc = require('minecraft-protocol')
|
||||
const { loadPlugins } = require('../util/loadPlugins')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
|
||||
const { chatPacketListener, parsePlayerMessages } = require('../../util/chat')
|
||||
function inject (bot, client, target) {
|
||||
const ChatMessage = require('prismarine-chat')(bot.version)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
|
||||
function inject (bot, client, target) {
|
||||
const { MessageBuilder } = require('prismarine-chat')(bot.version)
|
||||
client.on('packet', (data, meta) => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
|
||||
function inject (bot, client, target, config) {
|
||||
let cspy = false
|
||||
let op = true
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
|
||||
function inject (bot, dcclient, config) {
|
||||
let vanish = false
|
||||
let cspy = false
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
/* eslint-disable max-len */
|
||||
function inject (bot) {
|
||||
function inject (bot, dcclient, config) {
|
||||
const ChatMessage = require('prismarine-chat')(bot.version)
|
||||
bot.tellraw = function (selector, message) {
|
||||
if (config.chat.useChat && selector === '@a') {
|
||||
bot.chat(ChatMessage.fromNotch(message).toMotd().replaceAll('\xa7', '&'))
|
||||
return
|
||||
}
|
||||
bot.core.run(`minecraft:tellraw ${selector} ${typeof message === 'string' ? message : JSON.stringify(message)}`)
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
/**
|
||||
* for the chat packet listener (in util cuz proxy + bot)
|
||||
* @param {object} packet chat packet
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable require-jsdoc */
|
||||
|
||||
const styles = {
|
||||
bigint: '\xa76',
|
||||
boolean: '\xa76',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
/**
|
||||
* character allowed in mc chat
|
||||
* @param {String} character the character
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const profanityNames = ['Eagler', 'Eagler', 'Bitch', 'Cock', 'Milf', 'Milf', 'Yeer', 'Groon',
|
||||
'Eag', 'Deevis', 'Chode', 'Deev', 'Deev', 'Fucker', 'Fucking',
|
||||
'Dumpster', 'Dumpster', 'Cum', 'Chad', 'Egg', 'Fudgler', 'Fudgli',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable max-len */
|
||||
const fs = require('fs/promises')
|
||||
const util = require('util')
|
||||
const path = require('path')
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable max-len */
|
||||
/* eslint-disable require-jsdoc */
|
||||
|
||||
const { Midi } = require('@tonejs/midi')
|
||||
const { convertNote, convertPercussionNote } = require('./convert_note.js')
|
||||
|
||||
|
|
Loading…
Reference in a new issue