Refactor delete_birthday to match add_birthday pattern#40
Draft
Copilot wants to merge 23 commits into
Draft
Conversation
This file will soon not have any commands
Finally all of them are in their seperate files with an easy interface
I don't even remeber why i spesifically added theese lines to git but maybe future will me will be happy i made this a seperate commit
The cursor and all that seemed a little too complicated for what i am doing Maybe in the future we could even create a `Table` class where i can do querries from and it will have an enum selecter for "SELECT/INSERT/DELETE..." ext. and with that i can get rid of some of this annoying boilerplate that currently exists with the `_table_name` variable
This is to support any type of data storage be it the legacy Json storing or the new SQL support, so i can dependecy inject the correct class
Improved it to support per guild Birthdays too now! Also ignore the newly created JSON file
I finally kinda like the abstraction I've created
Should changing DBs in the future at least a bit easier, Maybe I should have just used SQLAlchemy but hey this time we gonna go Least Abstract -> Most Abstract, except I have the library handleing the pooling system, removing the entire premise of learning but eh...
Co-authored-by: kytpbs <95276965+kytpbs@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update logic in birthday command
Refactor delete_birthday to match add_birthday pattern
Jan 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
delete_birthdayfunction had inconsistent structure compared to other commands in the file, with the data provider fetched after validation checks rather than at the start.Changes
birthday_providernow fetched immediately, matchingadd_birthdaypatternuser = user or interaction.usertoif user is None: user = interaction.userBefore:
After:
Functionality unchanged. All commands now follow consistent initialization pattern.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.sh/usr/bin/curl curl -LsSf REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Created from VS Code via the GitHub Pull Request extension.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.