TextCommandService

This is very cool! I suggest making TextCommandService.new() like RaycastParams.new(), where instead of using the parameters to set the properties, you change the properties by indexing using a dot. For example:

local MyCommand = TextCommandService.new()
MyCommand.Name = "CommandExample"
MyCommand.Aliases = {"DoSomething", "DoSome"}
MyCommand.AdminOnly = false

And can you make it so that TextCommand.Message() sends a System Message in the server if Player is nil, and add a PrefixText property so that "[ System ]: " can be changed.

Sorry if it’s too much, it’s just my thoughts, opinions and suggestions. Thank you :heart:

2 Likes

I updated the module this methods above are outdated or you can say it’s deprecated.
I didn’t announce this or added it to the update list sorry for all
command names are unused now
new method:

local TextCommandService = require(game:GetService("ReplicatedStorage").TextCommandService.Module)

local Command = TextCommandService.new({"/Fly"}, true)	
	:BindTo(function(player, message)
		print("Command Spawned!")
	end)
	:Listen { ["Message"] = "Hello World!"; ["Type"] = 2; }
	:ListenToAll { ["Message"] = "Every player will receive this message from the server!"; ["Type"] = 2; }

TextCommandService.Settings.MessagePrefix.Value = "Server"

Changing prefix is already there just 1 line of code:
TextCommandService.Settings.MessagePrefix.Value = “Example”

and thank you for your feedback!
I will update the post later.

1 Like

.CreateDefaultCommands() is deprecated but fine to use.
I will Recreate it later.