There is simmilar issue open rn, but I guess this idea is too much complicated to just add a comment.
As it turns out, detailed issues have a higher chance of getting help, so if I'll write a lot about it, maybe some good spirits will help.
What do I mean?
I am thinking about turning, like all data, to JSON like this:
{
instance : {
guilds : {
: {
prefix : ,
users_count : ,
members_count : ,
messages_alert_channel : ,
log_channels : {
messages : ,
channels : ,
users : ,
join_leave :
},
},
check_messages : {
key_words : [ ] ,
limit_in_messages : ,
links_allowed : {
users : ,
moderators : ,
admins :
},
check : {
key_words : ,
links : ,
},
penalties : {
key_words : [],
links : [],
},
}.
},
:{ ... },
...
commands : { }
}
Is it too complex? I guess it is, ask for explanation if needed.
Such schema would be made on every bot instance start, and would update in run.
Whole point of such data-keeping schema is to:
Maybe make commands faster ( there would be less db requests )
Of course if user uses command to edit some values it would edit it in db.
Oh and databases.
Maybe create one table for guilds? And store there single guild object like schown abowe?
But there is problem, that if user edits someting on website, it will take affect on db, but not on object. Such edit could. f.e. affect only one guild child-object, but there must be communication beetwen website and bot.
First and most important question is: will it help, will it work better with such functionality, and most important - will it work well on 1000, 10000 or even 100000 guilds?
Or will it just complicate things more.
What to you think?
There is simmilar issue open rn, but I guess this idea is too much complicated to just add a comment.
As it turns out, detailed issues have a higher chance of getting help, so if I'll write a lot about it, maybe some good spirits will help.
What do I mean?
I am thinking about turning, like all data, to JSON like this:
{ instance : { guilds : {