Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Possibly new config #109

Open
Chikachi opened this issue Oct 14, 2017 · 11 comments

Comments

Projects
5 participants
@Chikachi
Copy link
Owner

commented Oct 14, 2017

With so many people having issues with the new config I'm thinking if a rethinking of the config would be the best way to go?

I'm thinking of a setup where you define the relays you want with from and to.
That will remove the whole fallback logic, so the relays you define is the relays you get.

Maybe something along these lines

{
    "configure": {
        "generic": {
            "enableLink": true
        },
        "discord": {
            "token": "",
            "ignoreBot": true,
            "ignoreUser": [],
            "commandPrefix": "!",
            "enableCommand": true,
            "channels": {},
            "commands": []
        },
        "minecraft": {
            "serverStart": [],
            "serverStop": [],
            "serverCrash": [],
            "integrations": {
                "dynmap": {
                    "enable": true
                }
            }
        },
        "imc": {
            "enable": true,
            "mode": "whitelist",
            "list": []
        }
    },
    "relays": [
        {
            "type": "chat",
            "from": {
                "platform": "minecraft",
                "dimension": "*"
            },
            "to": {
                "platform": "discord",
                "channel": 1234567890
            },
            "format": "[{USER}] {MESSAGE}",
            "bidirectional": true
        },
        {
            "type": "command",
            "from": {
                "platform": "minecraft",
                "dimension": "*"
            },
            "to": {
                "platform": "discord",
                "channel": 1234567891
            },
            "format": "**{USER}** executed **{COMMAND} {ARGUMENTS}**",
        }
    ]
}

@Chikachi Chikachi added the Discussion label Oct 14, 2017

@MyNameBeMrRandom

This comment has been minimized.

Copy link

commented Oct 14, 2017

This is a good idea but maybe if you acctually updated the wiki with a bit more detail on where things go and such it would better... or you could make this website work better https://wip.discordintegration.net/config/generator

@andrelec1

This comment has been minimized.

Copy link

commented Oct 14, 2017

good idea
but "dimension" and "channel" need to be a array ...
why "imc" is not in "configure" ?

in your exemple, le third "relays" element doesn't have "type", so what is its use ?

@Chikachi

This comment has been minimized.

Copy link
Owner Author

commented Oct 18, 2017

@MyNameBeMrRandom
The fact that I would need a generator probably shows that the current config layout just won't cut it.

@andrelec1
Would probably make it support both array and single value.
Moved imc to configure
Removed the third relays element, was left over when I was making examples.

@MyNameBeMrRandom

This comment has been minimized.

Copy link

commented Oct 18, 2017

@Chikachi Yes the only reason i use that config gen is because 1) Im a noob and 2) The Mods Wiki hasnt been updated

@Chikachi

This comment has been minimized.

Copy link
Owner Author

commented Oct 19, 2017

@DemonseedElite

This comment has been minimized.

Copy link

commented Oct 19, 2017

The new Config is fine... I just think the Wiki needs more work. I'm a programmer, I understand JSONs... most people don't though. Granted, it took me a dozen attempts at editing it to get it to work.
The Wiki is trying to explain ALL the config, ALL at once, on one page, and it's missing things.
For example, the Wiki leaves the "channel" for the generic minecraft relay empty...
It should show something like:
"discordChannel": [
"123456789101112134", // ID of a Discord channel, the bot should relay messages on
],

Make a SIMPLE example:
-put token here-
-put discord channel ID here for relaying everything-
...no commands, no customization, just simple 2-way communication, because that's how 95% of everyone uses this mod.

Then a second example adding onto the first example with some commands and permissions...
Then how to relay to multiple Discord channels...
Then maybe how to have different Minecraft dimensions relay to different channels or something...

OH!!! And run the examples through https://jsonlint.com/ ! Right now, if you copy-paste them and JUST remove the comments, they fail! This is what a lot of people are doing. There's a lot of hanging commas on the last elements.

@MyNameBeMrRandom

This comment has been minimized.

Copy link

commented Oct 19, 2017

That is what i meant ^^^
Theres nothing missing just need a bit more explaining for newbs like me

@DemonseedElite

This comment has been minimized.

Copy link

commented Oct 19, 2017

To help people out and because it took me a while to figure it out. Here is my config script. https://pastebin.com/3BvBJMnP
Instructions are at the top of what to replace in it. It works how I want it to. Hopefully it'll give you guys a working exemplar to crib off of.
Here's another, more raw copy of it if you're still having issues:
https://pastebin.com/J9cSCEFQ

@MyNameBeMrRandom

This comment has been minimized.

Copy link

commented Oct 19, 2017

@DemonseedElite OMG IT WORKED THANKS!

@DemonseedElite

This comment has been minimized.

Copy link

commented Oct 19, 2017

Glad my example was able to get you up and running finally MrRandom 😁

@andrelec1

This comment has been minimized.

Copy link

commented Oct 23, 2017

I help some one else on discord, and i note the fact that people link their config without removing their discord token ... and i think this is a security issue !

maybe think to cut the config in two file, like "relays" in file and general + token in another ... so people juste links their "relais" file for asking help ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.