Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

feat: add dict postprocessing in sync comparison #613

Closed
wants to merge 2 commits into from
Closed

Conversation

LordOfPolls
Copy link
Member

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

Discord loves not sending data, we know that. This pr adds a post_processing system to option comparison, which currently is the problem-child.

Post processing, in effect, adds any missing keys that discord decided weren't worth sending. The system has been built to be scalable, simply add the field name that needs processing, and a lambda function to inact the change.

I'm marking this as a discord bug as this is discord deciding not to send data, causing us to have to handle their issues.

Changes

  • Add post_processing dict to compare_options
  • Call lambda function when comparing options

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@LordOfPolls LordOfPolls added Improvement Something that is already implemented but can be done better Bug::Discord A bug caused by a discord change labels Aug 22, 2022
@LordOfPolls
Copy link
Member Author

This PR is being closed as its changes are being integrated into another

@LordOfPolls LordOfPolls deleted the sync_fix branch August 23, 2022 04:08
@LordOfPolls LordOfPolls mentioned this pull request Aug 23, 2022
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug::Discord A bug caused by a discord change Improvement Something that is already implemented but can be done better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant