From be0a83dde158245c50df8c3706d0f266e23f63ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 11 Feb 2024 14:46:57 +0000 Subject: [PATCH] deploy: 62b37ebbc2ba84df30c7ab1ae674e00f4e6d087a --- 404.html | 2 +- assets/js/15d99295.37a03c04.js | 1 + assets/js/15d99295.7e439574.js | 1 - .../js/{runtime~main.1aeef9c6.js => runtime~main.ffe63d5c.js} | 2 +- docs/getting-started/examples/index.html | 2 +- docs/getting-started/installation/index.html | 2 +- docs/guides/commands/index.html | 2 +- docs/guides/index.html | 2 +- docs/guides/registration/index.html | 2 +- docs/guides/types/index.html | 2 +- docs/index.html | 4 ++-- index.html | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 assets/js/15d99295.37a03c04.js delete mode 100644 assets/js/15d99295.7e439574.js rename assets/js/{runtime~main.1aeef9c6.js => runtime~main.ffe63d5c.js} (98%) diff --git a/404.html b/404.html index 6fedf23b..8dec78fa 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@
Commander needs to be started once on the client and server.
When using React in development mode (_G.__DEV__
set to true), you must set
_G.__DEV__
to true before importing Commander.
To start Commander on the client, you'll need to provide some extra options if you want to use -its user interface.
CommanderClient.start(
(registry) => {
// Register commands or types here
},
{
// The interface that will be used to interact with Commander
// Commander comes with a default interface, but you can create your own
interface: CommanderInterface(),
// You can also customize the interface by providing options
interface: CommanderInterface({
position: new UDim2(),
size: new UDim2(),
...
})
// The options below are optional
// The default key is F2, but you can change it here
activationKeys: [Enum.KeyCode.F2],
// The maximum terminal and command history length, default length is 1000
historyLength: 1000,
// If you don't want to register built-in types, you can change this option
// This is set to true by default
registerBuiltInTypes: true,
},
).catch((err) => warn("Commander could not be started:", tostring(err)));
CommanderServer.start(
(registry) => {
// Register commands or types here
},
{
// If you don't want to register built-in types, you can change this option
// This is set to true by default.
registerBuiltInTypes: true,
},
).catch((err) => warn("Commander could not be started:", tostring(err)));
CommanderClient.start(
(registry) => {
// Register commands or types here
},
{
interface: CommanderInterface({
// You can configure the interface here, such as changing activation keys
})
// The options below are optional
// The maximum terminal and command history length, default length is 1000
historyLength: 1000,
// If you don't want to register built-in types, you can change this option
// This is set to true by default
registerBuiltInTypes: true,
},
).catch((err) => warn("Commander could not be started:", tostring(err)));
CommanderServer.start(
(registry) => {
// Register commands or types here
},
{
// If you don't want to register built-in types, you can change this option
// This is set to true by default.
registerBuiltInTypes: true,
},
).catch((err) => warn("Commander could not be started:", tostring(err)));
The way commands and types are registered is the same on the server and client.
CommanderServer.start((registry) => {
// Register commands by loading all command ModuleScripts under an Instance
// You can also use this for types: ModuleScripts that export a function
// will be called with the registry object, allowing you to do any
// registration there.
const commandContainer = script.Parent.commands;
registry.register(commandContainer);
// If you've already loaded the command ModuleScripts
// (e.g. through Flamework.addPaths) you can register
// them like this:
registry.registerCommands();
// Type objects are registered like this:
registry.registerType(someType);
registry.registerTypes(someOtherType, anotherType);
}).catch((err) => warn("Commander could not be started:", tostring(err)));