mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-01 22:55:40 -05:00
v7.0.5, build: 2200. debloated the bot, implemented some v8 features, converted the config to js, made the disconnect, error, and kick_disconnect packets emit as clientDisconnect, fixed mem leaks, made vanish and command spy selfcare use core, removed filter, customchat, command suggestions and boot modules
This commit is contained in:
@@ -5,14 +5,13 @@ function inject (context) {
|
||||
const bot = context.bot;
|
||||
const config = context.config;
|
||||
const options = context.options;
|
||||
const { MessageBuilder } = require('prismarine-chat')(bot.options.version);
|
||||
|
||||
bot.on("parsed_message", (data) => {
|
||||
if (data.type !== "minecraft:chat") return;
|
||||
const prefixes = config.prefixes;
|
||||
prefixes.map((prefix) => {
|
||||
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString();
|
||||
|
||||
// console.log(plainMessage);
|
||||
if (!plainMessage.startsWith(prefix)) return
|
||||
const command = plainMessage.substring(prefix.length)
|
||||
const source = new CommandSource(data.sender, { discord: false, console: false }, true)
|
||||
|
||||
Reference in New Issue
Block a user