Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Additional Custom Commands don't work [1.12.2-3.0.5] #166

Closed
kreezxil opened this issue Sep 25, 2018 · 7 comments
Closed

Additional Custom Commands don't work [1.12.2-3.0.5] #166

kreezxil opened this issue Sep 25, 2018 · 7 comments

Comments

@kreezxil
Copy link

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

@MiraWaNeko
Copy link
Owner

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.

@MiraWaNeko
Copy link
Owner

Have you tried setting the permission to the user: type?
Just to check if there's something wrong with the role: type permissions

@kreezxil
Copy link
Author

Did you look at my paste to see if there was a glaring issue with my json syntax in regards to the mod?

@kreezxil
Copy link
Author

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.

@MiraWaNeko
Copy link
Owner

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

@Mijago
Copy link
Collaborator

Mijago commented Oct 30, 2018

You can get the ID of the role staff by typing \@staff in discord.
This gives you something like this: <@267348412374694456>. The number is the role id.

This is less a DiscordIntegration bug but more a thing missing in the documentation (plus, a missing discord feature).

@Mijago Mijago closed this as completed Oct 30, 2018
@kreezxil
Copy link
Author

kreezxil commented Oct 30, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants