-
Notifications
You must be signed in to change notification settings - Fork 77
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
Feat: Allow overriding channel config via .env file #584
Feat: Allow overriding channel config via .env file #584
Conversation
At this point, I don't see a reason for us to keep our own channels hard coded at all. A maintainer can migrate the hard coded channels into the .env on the server. Since a user who is forking and cloning the bot will have no use of the hard coded values anyway, and they won't work even if they used them. I would just include all the channels into .env. This will also reduce the logic that is in the config file after this PR. |
I have a few thoughts on this, but am currently on holiday; will see if I can get them together tomorrow |
So a few thoughts:
|
Tests shouldn't be effected by this, there should be mocked to replace the IDs with arbitrary ones. If some test were effected, then that is bad design in the test themselves, and we can refactor those. But I understand if you don't feel like working on those tests in this PR itself we can see to move forward with this, and I can refactor that later to include only IDs in .env I don't see a problem with maintainer have to do this themselves in the .env file. There are some channels that you do not have access to, for example, and you wouldn't be able to retrieve their IDs without maintainer help. Another thing is a maintainer are able to create new channels which they will include in the .env themselves afterward it wouldn't be expected of you to come and do a PR every time a new channel is created. Since the maintainer will merge the PR, I don't see it being a problem when they do the change afterward. I would personally still prefer a file to contain a hard coded value or an .env, having both doesn't seem necessary and add complexity / logic to configuration files. But that's just me, maybe it's ok by the maintainers, then we can move forward without having to worry about the things you mentioned. |
@TheOdinProject/odin-bot thoughts about the above suggestion from Mclilzee? Makes sense in theory to me but since it would change our workflow, I wouldn't want such a change (removing all hardcoded IDs and moving all to env vars) approved without us all being aware of the change, since I'm not sure if all of us have access to the bot deployment itself (I don't). |
Co-authored-by: MaoShizhong <[email protected]>
Because
.env
#582This PR
.env
.env.sample
to include a note on this functionalityIssue
Closes #582
Additional Information
Pull Request Requirements
location of change: brief description of change
format, e.g.Callbacks command: Update verbiage
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section