-
Notifications
You must be signed in to change notification settings - Fork 11
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
User Preferences vs Server Preferences #36
Comments
One idea here is to use the roles feature to issue roles for certain permissions to each user that may need one or want one. This can be an admin-level slash command. |
Thoughts:
|
Update: We could store the entire contents of the aforementioned JSON file as a value in Redis and link it to a "user preferences" key. However, this means we would be caching a new set of user preferences for the entire server and calling the entire JSON each time we update or check for a user preference. |
My Idea for a new approach, have a My initial thoughts: export interface UserConfiguration {
'message-stream'?: boolean,
'message-style'?: boolean,
'modify-capacity': number
}
export interface ServerConfiguration {
'toggle-chat'?: boolean,
'channel-toggle'?: boolean
}
/**
* Parent Configuration interface
*
* @see serverOptions server settings per guild
* @see userConfigurations user configurations (only for the user for any server)
*/
export interface Configuration {
readonly name: string
serverOptions: {
[guildId: string]: ServerConfiguration
},
userConfigurations: {
[username: string]: UserConfiguration
}
} The Redis plan would look similar, but instead of 1 file, it's just multiple files for users and servers (or 1 file for servers idk). This allows the bot to be compatible for multiple servers with their own settings and for users having their own settings. |
I only have one concern, about the definition of each configuration.
|
|
For now I will develop them separately:
If you have any other questions just let me know. |
Issue
Solutions
server_name.json
for that servers configurations in aconfig/
folder.The text was updated successfully, but these errors were encountered: