-
Notifications
You must be signed in to change notification settings - Fork 16
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
Have a default config file. #50
Comments
Well this is just a idea, when the bot starts in a particular server it will create a |
What do you mean? |
we could have the file generate when the bot is run(dynamic), or should we add it to the repo(static)? |
Why would we want to generate a file? |
To avoid the work of getting all ids of roles/emojis/channels |
Dynamically when bot is run. |
Why though? |
That could also be done... |
Yeah just like vyvy said |
Are u saying that we create such a configuration that when people would run the bot in their servers that it would get the required channel and role ids and replace the once in config-default.json. |
Yes |
I guess we can do that. Let's see what others have to say. |
I like the idea of having some default config. Maybe we could include a file that defaults to the bot test server, so it's easy to get started with contributing. Regarding scalability, I think we should have a setup wizard command for servers in the future, but that's nothing we should think about right now imo. For now, I think a config file would be fine, that you duplicate (and change the name of to something predefined, like |
Ye, but we could also make it so that they wouldn't have to go through the hassle of getting the ids of channels and roles. |
That would require having the exact same channel names? |
Yes it would, as it would indicate that they are configuring the bot to contribute to Gurkult. |
Why wouldn't they just join the server and the test server? If they really want to do it on their own, they could possibly just enter the IDs imo. |
By having this, the people that don't want to test in our test server, wouldn't have to go through the hassle of getting the ids of all the channels and roles. I mean not everyone would want to test in the test server. |
perhaps we could make a setup.py file, to make the config.json file(it can be run, when using the bot for the first time) |
Well that is something I was working in, and it is a time taking process and Python Discord is already building a smart config, so either we what till. March for that or you gives me sometime to come with a way to do that. |
Why would we have to wait? |
I like the general idea but I'm unsure as to whether we should wait for Smart Config to be developed or make something of our own in the mean time. Just a small note, we shouldn't call it |
Right, but that's not the purpose of this issue though.
|
For testing purposes, this could possibly work great. We could probably make sure that the user just runs it through enabling a DEV flag or something. This means we could add something to automatically create categories and roles that don't yet exist, through checking which ones already exist in the server. This would allow the bot to update the server to match the default config easily, on first startup and after pulling new versions, which would be quite fantastic for a testing server (instead of letting the user create roles themselves, like in your third bullet point). |
I think you misunderstood my third bullet point. Also I agree with your idea on creating the roles and channels in the server when first ran, |
So, the user could have a test server that doesn't have all of the required roles? |
Well we could create the roles that are missing as u suggested. |
This is what I'm proposing that the bot does when the script is run (could be configured to run automatically on every git pull)
The user could also choose to run it manually whenever they think it's needed, using something like |
Why would we want to update it only when ran? |
Well, here are the times that I think we should run it:
Do we also want it to run every time the bot starts? Nah, that's probably overkill, or what do you think? |
Run what may I ask |
The script that updates the config file to match the server. |
It wouldn't be a script, it would just be a cog that listens for events in the server and update the config file accordingly. But, we should also do what you suggested and create the required channels and roles if they do not exist, in the backend folder. |
So here is the plan.
|
Why do you want a sync that goes the Especially in test servers, there are often For the record, I've already described how this would preferably work in #50 (comment) |
Ye that does make sense. So..., we would have a script that creates a config file containing all the required information in the server, if some of the required information is not present in the server then the bot would create it, and add it to the config file? Also, when would the bot check if the roles and ids exist or they have been deleted? |
Basically, yeah. These are the two files that I think should exist, where both should have either a JSON or YAML format. The names can be changed.
In order to create
This script would be a bit more complex, but the goal of it is to have valid IDs in |
Sounds good. Now we need to agree on the type of file that needs to be used. |
We should have a default config file so that the people that want to contribute don't have to constantly switch between their editor/IDE to discord just to get the id's of the channels or roles. The information in the config file would be accessible across the entire project. The config file could either be json or yaml. We would initialize the information stored in the config in constants.py, and we would import those information across the project.
The text was updated successfully, but these errors were encountered: