return {
Name = "modifyCurrency";
Aliases = {"cash", "changeCash"};
Description = "Change currency data of a Player.";
Group = "Admin";
Args = {
{
Type = 'string';
Name = 'Type';
Description = 'Type of the data (add/remove/set).';
Presets = {
{
Name = 'add', -- name
Value = 'ADD' -- will return ADD
},
{
Name = 'remove', -- name
Value = 'REMOVE' -- will return REMOVE
},
{
Name = 'set', -- name
Value = 'SET' -- will return SET
},
}
},
{
Type = 'player';
Name = 'Player';
Description = 'The Player that you will modify his data.';
},
{
Type = 'number';
Name = 'Value';
Description = 'Value of the data.';
},
}
}
Hi, I am not sure how to make this type listable. Can anyone help me please? I have looked in the documentation, but there is no way documented to make an Enum type listable.
return function (registry)
registry:RegisterType("pass", registry.Cmdr.Util.MakeEnumType("Pass", {
"ROCKETLAUNCHER",
"VIP",
"DOUBLEJUMP",
"GRAVITYCOIL",
"SPEEDCOIL"
}))
end
Cmdr v1.12.0 - Bug Fixes, Improvements, and Security Advisory
Hello fellow developers,
We are excited to announce the release of Cmdr v1.12.0! This version brings several bug fixes, quality of life improvements, and a security advisory that requires your immediate attention. Let’s dive into the details:
Changelog
Added a new default command: convertTimestamp. It provides a human-readable timestamp from epoch seconds.
Introduced built-in types: positiveInteger, nonNegativeInteger, byte (0-255), and digit (0-9), including their respective plural types.
Added a json built-in type, which takes a JSON string and provides a Luau table.
Implemented internal IsServer assertions for RegisterDefaultCommands and commandServerScript.
Updated the help command output with useful ‘tips.’
Made the window scroll to the bottom on input.
Modified fuzzy finders to search the entire string instead of just the start.
Improved the autocomplete menu by making it scrollable.
Fixed the window resizing issue that occurred after using the clear command.
Removed the global initialization scripts feature.
Security Advisory
Please note that in version 1.12.0, a high-severity security vulnerability (CVSS 7.5) was discovered. This vulnerability affects the var and var= (varSet) commands. If you use Cmdr in a production environment, we urge you to read the security advisory provided at the following link for more information:
The bug in the var and var= (varSet) commands allows potential attackers to execute commands on behalf of others, including with those users’ permissions. It is crucial to take immediate action to address this vulnerability and upgrade to the latest version of Cmdr.
To update your Cmdr installation to v1.12.0, please visit the official repository on GitHub:
We highly recommend all developers using Cmdr to update to this version to benefit from the bug fixes and improvements while addressing the security vulnerability.
If you have any questions, concerns, or feedback regarding this release or the security advisory, please don’t hesitate to reach out. We appreciate your continued support and collaboration in making Cmdr a robust and secure command-line framework.
This honestly seems like one, if not the best open source console command system I’ve seen. I might make something similar to this in the future, but for now this is definitely a system that I’ll be looking into and perhaps implementing into my own open sourced admin system.
I have addressed your thread. For faster support from our team, I suggest joining our Discord server and utilizing the #cmdr channel. This way, you can receive prompt assistance.
I know previously I’ve suggested this, but people told me to put a github issue about it, but I forgot and now I’m blocked from creating issues, so I’ll put it here.
Ability to define a table of command permissions/groups like:
return {
Name = "kick",
Aliases = {"boot"},
Description = "Kicks a player",
Group = {"Creators", "Administrators"},
Args = {
{
Type = "player",
Name = "target",
Description = "The player being kicked"
},
{
Type = "string",
Name = "reason",
Description = "The reason for kicking this player"
}
}
}
This will be useful, if somebody has multiple command permissions and can set them individually. I would pull request a feature like this, but cannot.
The Group property within the CommandDefinition interface serves as a categorization label for commands, functioning much like an identifier. To regulate user access and permissions for specific commands, it is recommended to utilize a BeforeRun hook that evaluates the command’s associated Group.
Alright, thank you. Do you know how to get the Group property within the commanddefinition?
return {
Name = "kick",
Aliases = {"boot"},
Description = "Kicks a player",
Group = {"Creators", "Administrators"}, -- want to get this in my BeforeRun
Args = {
{
Type = "player",
Name = "target",
Description = "The player being kicked"
},
{
Type = "string",
Name = "reason",
Description = "The reason for kicking this player"
}
}
}
I found this very useful, But I did (kinda) run into an issue while Making a gravity Command.
It works fine with numbers but I want to it be a
Number or “Default”
I like that It has typechecks, But I want to cram multiple types into one function. Like number|"Default"|"Random"
For now I am just using a ResetGravity function. and CrazyGravity
I suggest developing a custom number type tailored to your specific scenario instead of relying on the default number type. You can refer to the Types guide for a detailed example of how to create a custom type that suits your needs.
Hello, thank you for taking the time to read my comment.
I do have a question/suggestion and it is regarding future plans for management of team’s;
Is there plans for group permissions and or, management features, such as roles in groups giving specific permissions?
this project seems it would have benefits with more gravitas if it was optimised for group ID’s and rank’s allowing more genuine control over administrative features for multiple users.
Other than this small overlook, I feel this is an extremely powerful resource and I’m intrigued by your project.
From reading, it seems to be an extensive module for intricate customisation via command’s.
To toggle the visibility of the console, you can utilize the CmdrClient:Toggle() method. However, you’ll need to develop your own method for detecting user input to determine when to invoke the method.