Discord Integration Forge

Discord Integration Forge

666k Downloads

[Suggestion] Introduce a new exec command for Discord?

GamingWithFusion opened this issue ยท 3 comments

commented

##Platform
[x] Forge
[ ] Spigot
(1.12.2 and/ or 1.16.4)
Although you have stated that 1.12.2 won't be receiving further updates. it would be nice to have a working exec command for
this instance, maybe even a working commandJson would work for 1.12.2 and a default implementation viable for 1.16.4+, as I
run multiple modpacks on my servers that run on 1.12.2 and 1.16.4+

What I want possibly included into dcIntegration? Otherwise just an updated script.

  • I'm requesting a new and updating admin execute a command similar to #48, because when I tried to use the included
    commandJson the newest dcIntegration did not support it. Maybe this could just be included in a new version of
    dcIntegration? If not and this is such a specific issue then that's fine, but this command would be great to use in a specific
    admin-only Discord channel separate from where the bot normally runs.

When using the code from #48, I receive an error to load, but without the included code it runs fine.

{"exec":{"adminOnly":true,"mcCommand":"","description":"Executes an command","useArgs":true,"argText":"<command>"}}

Error as followed

[modloading-worker-4/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Failed to create mod 
instance. ModID: dcintegration, class de.erdbeerbaerlp.dcintegration.forge.DiscordIntegration
java.lang.ExceptionInInitializerError: null
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Invalid value on line 47: customCommandJSON = 
{\"kick\":{\"adminOnly\":true,\"mcCommand\":\"kick\",\"description\":\"Kicks a player from the 
server\",\"useArgs\":true,\"argText\":\"<player> [reason]\"},\"stop\": 
{\"adminOnly\":true,\"mcCommand\":\"stop\",\"description\":\"Stops the server\",\"aliases\": 
[\"shutdown\"],\"useArgs\":false},\"kill\":{\"adminOnly\":true,\"mcCommand\":\"kill\",\"description\":\"Kills a 
player\",\"useArgs\":true,\"argText\":\"<player>\"},\"exec\":{\"adminOnly\":true,\"mcCommand\":\"\",\"description\":\"Executes 
an command\",\"useArgs\":true,\"argText\":\"<command>\"}}```

#net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [
      Discord Integration (dcintegration) has failed to load correctly
?7java.lang.ExceptionInInitializerError: null


commented

Forgot to close this. Addon is now released. Get it from here: https://github.com/ErdbeerbaerLP/DiscordIntegration-Addon-Repository/tree/master/_Releases

commented

I might add such an command as an addon later

commented

I might add such an command as an addon later

I would definitely appreciate that, would be useful for the 1.17 smp I host with friends.

I'll leave this open, but feel free to close it at your discretion if you want. I'm glad it's on your mind now.