mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-01 14:45:43 -05:00
reverted back to components and other stuff
This commit is contained in:
@@ -23,25 +23,33 @@ class command_handler {
|
||||
data.sender,
|
||||
{ discord: false, console: false },
|
||||
data.chatType,
|
||||
null
|
||||
null,
|
||||
);
|
||||
|
||||
source.sendFeedback = (message) => {
|
||||
if (source.sources.console) bot.console.command();
|
||||
else if (source.sources.discord) {
|
||||
return message // lazy
|
||||
} else bot.tellraw(`@a[name="${source.player.profile.name}"]`, [message]);
|
||||
}
|
||||
return message; // lazy
|
||||
} else {
|
||||
if (options.mode === "savageFriends") bot.tellraw(`@a[name=${source.player.profile.name}]`, [
|
||||
message
|
||||
])
|
||||
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";
|
||||
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--;
|
||||
}, 1000);
|
||||
if (ratelimit > config.ratelimit.commands) {
|
||||
return
|
||||
return;
|
||||
} else if (command.split(" ")[0].length === 0) {
|
||||
} else {
|
||||
bot.commandManager.executeString(source, command);
|
||||
|
||||
Reference in New Issue
Block a user