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

Global and Local plugins #115

Open
FerdinandoLM opened this issue Aug 15, 2017 · 1 comment
Open

Global and Local plugins #115

FerdinandoLM opened this issue Aug 15, 2017 · 1 comment

Comments

@FerdinandoLM
Copy link
Collaborator

Some plugins like quote act globally (you set a quote and that quote is available everywhere the bot is running on), others like mset are local, and run only on the group they have been set.

Cloning the plugin making it work globally (example: Gquote for global quote and quote for local quote) or being able to select "global" or "local" when setting or when calling a plugin would be awesome.

@CapacitorSet
Copy link
Collaborator

Maybe this could be done with a global as well as local db (this.globalDB, this.localDB[message.chat.id])? However, local DB access would be rather cumbersome. Perhaps it could be passed to the event handler (eg. onText({message, command, args, localDB}))?

Of course, it would be up to the plugin author to provide a way to access global vs. local features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants