move useChat in tellraw plugin + remove unused eslint comment thingy

This commit is contained in:
ChomeNS 2022-12-05 15:16:48 +07:00
parent 9986dd31ed
commit 5b299d536a
61 changed files with 24 additions and 85 deletions

1
bot.js
View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const mc = require('minecraft-protocol')
const crypto = require('crypto')

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'ayunsudo',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'botuser',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'botvisibility',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'bruhify',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'cb',
alias: ['cmd', 'commandblock', 'run'],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const changelog = require('../changelog.json')
const { MessageEmbed } = require('discord.js')
module.exports = {

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'clearchat',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'clearchatqueue',
description: 'Clears the bot\'s chat queue',

View file

@ -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)

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const cowsay = require('cowsay2')
const cows = require('cowsay2/cows')
const { MessageEmbed } = require('discord.js')

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const sleep = require('sleep-promise')
/**

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'creator',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'discord',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { resize } = require('../util/image')
const axios = require('axios')
const sharp = require('sharp')

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'eaglercrash',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'echo',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'end',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'entity',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
const { VM } = require('vm2')
const axios = require('axios')

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'executebypass',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'gamemodeall',
alias: [],

View file

@ -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',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'list',

View file

@ -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')

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'netmsg',
alias: ['networkmessage', 'irc'],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { between } = require('../util/between')
module.exports = {
name: 'rtp',

View file

@ -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')

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'test',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
const moment = require('moment-timezone')
module.exports = {

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'tpall',
alias: [],

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
const translate = require('@vitalets/google-translate-api')
module.exports = {

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
const { secondsToHms } = require('../util/secondToHms')
module.exports = {

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const urban = require('urban-dictionary')
module.exports = {
name: 'urban',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const { MessageEmbed } = require('discord.js')
module.exports = {
name: 'uuid',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
name: 'validate',
description: 'Validates hash',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const wiki = require('wikipedia')
const util = require('util')
const { MessageEmbed } = require('discord.js')

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
module.exports = {
version: '1.18.2',
prefixes: [

View file

@ -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 })

View file

@ -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')

View file

@ -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) {

View file

@ -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')

View file

@ -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) {

View file

@ -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)

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const convert = require('color-convert')
// eslint-disable-next-line require-jsdoc

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const crypto = require('crypto')
module.exports = {
inject: function (bot, dcclient, config) {

View file

@ -1,5 +1,4 @@
/* eslint-disable require-jsdoc */
/* eslint-disable max-len */
const { Midi } = require('@tonejs/midi')
const { convertMidi } = require('../util/midi_converter')

View file

@ -1,5 +1,4 @@
/* eslint-disable max-len */
/* eslint-disable require-jsdoc */
class PlayerList {
list = []

View file

@ -1,4 +1,4 @@
/* eslint-disable require-jsdoc */
function inject (bot) {
bot.position = { x: 0, y: 0, z: 0 }
bot._client.on('position', (position) => {

View file

@ -1,4 +1,4 @@
/* eslint-disable require-jsdoc */
const util = require('util')
const mc = require('minecraft-protocol')
const { loadPlugins } = require('../util/loadPlugins')

View file

@ -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)

View file

@ -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) => {

View file

@ -1,4 +1,4 @@
/* eslint-disable require-jsdoc */
function inject (bot, client, target, config) {
let cspy = false
let op = true

View file

@ -1,5 +1,4 @@
/* eslint-disable require-jsdoc */
/* eslint-disable max-len */
function inject (bot, dcclient, config) {
let vanish = false
let cspy = false

View file

@ -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)}`)
}
};

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
/**
* for the chat packet listener (in util cuz proxy + bot)
* @param {object} packet chat packet

View file

@ -1,4 +1,4 @@
/* eslint-disable require-jsdoc */
const styles = {
bigint: '\xa76',
boolean: '\xa76',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
/**
* character allowed in mc chat
* @param {String} character the character

View file

@ -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',

View file

@ -1,4 +1,3 @@
/* eslint-disable max-len */
const fs = require('fs/promises')
const util = require('util')
const path = require('path')

View file

@ -1,5 +1,4 @@
/* eslint-disable max-len */
/* eslint-disable require-jsdoc */
const { Midi } = require('@tonejs/midi')
const { convertNote, convertPercussionNote } = require('./convert_note.js')