added authentication

This commit is contained in:
Parker2991
2025-08-18 16:54:25 -05:00
parent dc08bcad37
commit 06258b3a0c
15 changed files with 329 additions and 83 deletions
+4 -7
View File
@@ -27,10 +27,10 @@ class command_handler {
);
source.sendFeedback = (message) => {
if (source.sources.console) bot.console.command(message);
if (source.sources.console) bot.console.command();
else if (source.sources.discord) {
// i dont know what to do for discord yet
} else bot.tellraw(`@a[name="${source.player.profile.name}"]`, message);
return message // lazy
} else bot.tellraw(`@a[name="${source.player.profile.name}"]`, [message]);
}
if (command.split(' ')[1] === bot.validation.trusted) source.player.hash = "trusted";
@@ -41,10 +41,7 @@ class command_handler {
ratelimit--;
}, 1000);
if (ratelimit > config.ratelimit.commands) {
bot.tellraw("@a", {
text: "You are using commands too fast!",
color: "dark_red",
});
return
} else if (command.split(" ")[0].length === 0) {
} else {
bot.commandManager.executeString(source, command);