-
Notifications
You must be signed in to change notification settings - Fork 64
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
add notification toggles and checks #58
Conversation
ace43a5
to
48256b8
Compare
48256b8
to
26e5109
Compare
Thanks, I noticed them yesterday too but I forgot about them pretty quickly. bool([(0,)]) == True and in the if statements we only check if the list is empty or not. EDIT: I guess it was faster to actually make the change than explaining it |
25fd4bb
to
2fdda6b
Compare
2fdda6b
to
aa07bb9
Compare
What do you think of merging the two tables? Does it make sense not to create a new table for every single new feature? |
I personally prefer having everything guild-specific in its own table (eg in this case system channels & notification setting ) while a bit more annoying to mange updates it is easier to remember how to get something from the database eg: I want the guild system channel I'll go read it from the guild settings table as it makes sense to be there. While not a problem with having 1 table for each setting it requires storing the guild id multiple times in multiple tables using up unnecessary space. I know it won't use up that much space but it feels like it is better to do it now then later if it is something that wants implementation later on. |
Alright, I will tweak the old db functions to maybe use INSERT OR IGNORE followed by an UPDATE to avoid headaches. (Since REPLACE would make values not specified NULL). |
After testing and inspecting the DB manually this looks good to go for me. Let me know if you have any comments before merging. |
Looks good👍 |
Describe the PR changes
guild_settings
: I would like to use this for anything guild related in the future, I tried to merge systemchannels into this but I couldn't find an elegant way yet. I will figure it out before merging... Most likely going to copy the contents into a new column and then delete the old table in theone_to_two
functionrl!notify
rl!notify
is first used or when the bot checks for it (a user adds or removes a reaction from themselves). In the first case, the bot toggles the notification on, in the latter, the bot sets notifications to off (the "default")I still need to test this properly, but comments are welcome
Closes #50