partially switched over to prismarine chats message builder

This commit is contained in:
Parker2991
2025-08-12 12:01:11 -05:00
parent c1c09466b4
commit 28be25d2e6
8 changed files with 138 additions and 93 deletions
+13 -1
View File
@@ -18,11 +18,23 @@ class command_handler {
if (!plainMessage?.startsWith(prefix)) return;
const command = plainMessage.substring(prefix.length);
const source = new CommandSource(
data.sender,
{ discord: false, console: false },
true,
null
);
source.sendFeedback = (message) => {
if (source.sources.console) bot.console.command(message);
else if (source.sources.discord) {
// i dont know what to do for discord yet
} else bot.tellraw(`@a[name="${source.player.profile.name}"]`, message);
}
if (command.split(' ')[1] === bot.validation.trusted) source.player.hash = "trusted";
else if (command.split(' ')[1] === bot.validation.admin) source.player.hash = "admin";
else if (command.split(' ')[1] === bot.validation.owner) source.player.hash = "owner";
ratelimit++;
setTimeout(() => {
ratelimit--;