MusicBot icon indicating copy to clipboard operation
MusicBot copied to clipboard

[Feature Request] Use JSON for storing Channel/User IDs

Open Bay40k opened this issue 6 years ago • 2 comments

I came across an issue where when I started having multiple server's channels binded, or even just a bunch of roles from various servers added to one group, the one line .ini system was getting cluttered.

Having a bunch of IDs on one line separated by space, with no efficient way to mark them, isn't very intuitive.

https://github.com/Bay40k/MusicBotJsonConfig

I made this repo since I couldn't really think of a good way to implement this myself. It basically explains what I'd like, a nice way to label and edit channel bind IDs/role IDs. update_channel_bind_ids.py, and update_group_role_ids.py will take the JSON from channel_bind_ids.json and role_ids.json respectively, and edit the respective configuration files so all the IDs are on one line.

https://github.com/Bay40k/MusicBotJsonConfig/blob/master/role_ids.json https://github.com/Bay40k/MusicBotJsonConfig/blob/master/channel_bind_ids.json

As you can see, storing the IDs in JSON looks much nicer, and is much easier to manage.

(Here's a kind of vague/quick example of this: https://github.com/Bay40k/MusicBotJsonConfig/blob/master/update_json_ui.py)

It's just a simple command line interface that can

  • Add JSON entries for Channel IDs/Role IDs
  • Remove existing entries
  • Write the JSON values to their location in their respective .ini file

Bay40k avatar Oct 04 '17 15:10 Bay40k

The bot is going to be reworked fully at some point. Hence why nothing is changing right now.

ImthePeach avatar Oct 05 '17 17:10 ImthePeach

@ImthePeach I see, well that's good to know!

Bay40k avatar Oct 05 '17 17:10 Bay40k