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

Allow the changing of variables through commands #729

Open
tanndlin opened this issue Aug 26, 2022 · 1 comment
Open

Allow the changing of variables through commands #729

tanndlin opened this issue Aug 26, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@tanndlin
Copy link
Collaborator

I want to be able to change certain toggles, or colors, etc. (semi-constant values) from a plugin
Maybe reusing the controller plugin

Would need to persist states as they change to be loaded up on bot start

@tanndlin tanndlin added the enhancement New feature or request label Aug 26, 2022
@c650
Copy link
Collaborator

c650 commented Aug 26, 2022

Some ideas

make a new Collection in the DB

You’ll have some object such that there is a Global scope for global things and then a scope per plugin, based on name or something uniqueish

each plugin accesses their stuff thru some service, and global things too, but it shouldn’t need to know about other plugins’ stuff and only the particular plugin should care about the structure of its data.

the interface to update fields in chat should take a scope (global or a particular plugin) and some straight JSON containing the new values of some fields.

We could do a copy on write for this so that you can go into the DB and delete the most recent entry to simulate a revert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants