Additional Custom Commands don't work [1.12.2-3.0.5]
kreezxil opened this issue · 7 comments
Base informations
Minecraft version:
1.12.2-14.23.4.2760
DiscordIntegration version:
1.12.2-3.0.5
Server type and version: Forge/Spigot/Sponge
Forge 1.12.2-14.23.4.2760
Link to pastebin with (censored) config: Optional
https://pastebin.com/BxiHiesH
Expected behavior
new custom commands to work
Actual behavior
The demo provided commands discord, tps, online, list all work as intended. But the other ones I added do not and are completely ignored.
Steps to reproduce
Install version 3.0.5 and add your own commands to it.
Also use Forge build 2760
Suggestion received via DM
(formatting cleaned up for better overview)
Allow the mod to be completely configurable in-game as well.
Command | Description | Example | Response |
---|---|---|---|
/discord custom add [name] [command] | Add custom command | /discord custom add kick /kick {ARG_1} | Custom command kick added with '/kick {ARG_1}' |
/discord custom modify [name] [command] | Edit custom command | /discord custom modify kick /kick {ARG_1} | Custom command kick modified to '/kick {ARG_1}' |
/discord custom enable [name] | Enable custom command | /discord custom enable kick | Custom command kick enabled |
/discord custom disable [name] | Disable custom command | /discord custom disable kick | Custom command kick disabled |
/discord custom addperm [name] [permission] | Adds permission to custom command | /discord custom disable addperm kick role:staff | Added permission for 'staff' role to custom command kick |
/discord custom delperm [name] [permission] | Remove permission to custom command | /discord custom disable delperm kick role:staff | Removed permission for 'staff' role to custom command kick |
Having this type of functionality removes the issues caused by editing json by hand and it allows you to tell everyone that fails at hand editing to use the internal method.
Have you tried setting the permission to the user:
type?
Just to check if there's something wrong with the role:
type permissions
Did you look at my paste to see if there was a glaring issue with my json syntax in regards to the mod?
Ok, the issue is when you try to use a named role like "role:staff" that doesn't work, but if you use the id of the role ie "role:0000000000000" that works.
Also the bot needs a way to expose the roleid of a role such that if issue maybe !roleid staff with spaces it would return 000000000000000. Because the method for Discord to reveal roleid's is not perfect. I use the tool from DiscordChat by ShadowFactsMC to reveal the roleid. That's also an open source and open licensed project, you could grab that code and then your mod is like totally awesome.
Okay, good to know the cause behind the issue. Thanks for checking that.
I was about to suggest the built-in Developer Mode
in Discord to get the IDs til I noticed, that I had no idea how to get the ID of a role..
We'd definitely need something for getting those