wildcard custom command
Natesky9 opened this issue ยท 2 comments
MC 1.12.2, DiscordIntegration-mc1.12.2-3.0.5
DiscordChat had an !exec command that would basically relay a command to the game, instead of predefining it in the config. While shorthand commands are useful, often I end up with a command that isn't used enough to be added to the list. But as much as I've tried, I can't seem to make a command that just relays the entire /command. I've trued args %arg1% but to no avail
expected:
!exec "Some command here"
server executes command
received:
"Can't recognize command, type /help..."
You can already do that, I did it on my server.
{
"name": "exec",
"command": "{ARGS}",
"enabled": true,
"aliases": [
"adm"
],
"permissions": [ ]
},
Now you can do
!exec stuff
Make sure you added permissions for your discord users.
Also note that DI uses an FakeUser (see README.md) which might not have the permission to execute every command a mod added. You can add the permissions using the permission plugin of your choice, DI can and does not handle this.
Ah, I see now, the {args} is case sensitive, and all commands have to be in quotes.
I suppose I should have known that, seeing as it's JSON, but it's not very well documented on how to make custom commands.
Speaking of which, how do you get just a simple reply? since broadcast isn't a thing, and /say doesn't do it