Skip to content
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

Satty9361 struct to sdict #681

Merged
merged 2 commits into from
May 21, 2020

Conversation

Satty9361
Copy link
Contributor

This is a convenience function to convert exported field-value pairs of a struct to an sdict. It would be very handy for editing embeds and such rather than having to reconstruct the embed field by field manually. Can also be used in finding values because you can range though an sdict and not a struct and a couple other use cases.

There are already some rather hacky ways of doing this (save to database and retrieve it) but this is better as it preserves datatypes as well as unnecessary database calls.

Doesnt include unexported fields.
@jogramming jogramming merged commit 60e9a00 into botlabs-gg:dev May 21, 2020
@Satty9361 Satty9361 deleted the Satty9361-struct-to-sdict branch December 13, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants