Changelog
v1.1.5
""
) can now be used to skip arguments which have default valuesChangelog
v1.1.4
filter
argument of RegisterDefaultCommands
was nonfunctional.Changelog
v1.1.3
Changelog
v1.1.2
Command history
history
utility command which dynamically returns your previously-entered commands based on a number index.! <number>
to re-run previous commands.
! -1
re-reruns your last command.! 2
re-runs your second command.!!
to re-run your last command.^ <search> <replace>
to re-run your last command with string substitution, replacing search
with replace
.New utility commands
history
(see above)position [player]
: Returns the Vector3 position of a player (or yourself if omitted) as a string X,Y,Z
.replace <haystack> <needle> <replacement>
: Substitutes text inside haystack
matching Lua pattern needle
with replacement
.discard <command string>
: Identical to run
, except the return value is discarded (always returns ""
).clear
: Clears the consoleNew default types
Usage improvements
\\
for escaping a literal backslash\"
and \'
for escaping quotes inside of strings\t
\t
is present in a line on the console\n
\n
literals may still be useful for custom commands.\xA9
(2-digit) and \u2661
(4-digit) hexadecimal unicode escapes\$
for escaping argument replacements and embedded commands in command strings only.help
command now lists command aliasesteleport
and to
now accept a Vector3 with the @
prefixAPI Improvements and Changes
Dispatcher:RegisterHooksIn
, RegisterTypesIn
, and RegisterCommandsIn
now allow nesting via folders.Dispatcher:AddHook
has been renamed to Dispatcher:RegisterHook
. The old name still exists as a fallback, but is undocumented and may be removed in the future.Data
and Run
(not a bug, but if someone is doing this then they are confused)priority
. Hooks run in order of priority; lower numbers run first. The default priority is 0
.State
table. This is intended to be used in combination with the BeforeRun
hook to allow you to add custom information to this command that you can consume inside of your command logic or other hooks.
State
table for your commands to consume and branch off of.CmdrClient:SetMashToEnable(true)
to enable Mash to Enable mode, which requires the player to press the activation key 7 times in quick succession to open the Cmdr menu for the first time. This is not meant as a security feature, but rather as a way to ensure that the console is not accidentally obtrusive to regular players of your game.Dispatcher:GetHistory()
to get an array of the local user's command history. This only includes commands actually typed by the user, no embedded or programmatically run commands.Dispatcher:EvaluateAndRun
now accepts an options table in the third parameter rather than Data.AutoExec
table which contains commands to execute immediately as the command is registered.
Utility methods
Util.MakeEnumType
and Util.MakeFuzzyFinder
now accept Enum
s and arrays of tables with a Name
key. (These functions can already accept: array of strings, array of Instances, array of EnumItems, or a single Instance whose children are used).Util.Map
and Util.Each
for mapping values of an array and tuple respectively.Util.MakeSequenceType
for quickly creating a type that contains a value sequence, like Vector3 or Color3. The delimeter can be either ,
or whitespace, checking ,
first.Util.SplitPrioritizedDelimeter
, Util.ParseEscapeSequences
, and Util.EmulateTabstops
.Bug fixes
announce
command text is now filtered through chat filterroblox-ts npm package
Cmdr is now available as an npm package for usage in roblox-ts.