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

Refactor: wrap each functionality in its own module #11

Open
tk3369 opened this issue Mar 24, 2021 · 2 comments
Open

Refactor: wrap each functionality in its own module #11

tk3369 opened this issue Mar 24, 2021 · 2 comments

Comments

@tk3369
Copy link
Member

tk3369 commented Mar 24, 2021

We should put the code for each functionality under its own sub-module to avoid namespace clashes.

@tk3369
Copy link
Member Author

tk3369 commented Apr 5, 2021

As an example, my recent discourse command contains a number of functions that must be prefix with discourse. That can be avoided if we use sub modules.

So it might be good to try refactoring it and see if it looks/works better.

@rapus95
Copy link
Member

rapus95 commented Jun 27, 2021

how do we integrate our new plugin modules into the framework?
Do we want some

module PluginBase

@reexport Discord

"Entry point for a new command plugin, only triggers on MessageCreate"
function handle_command end

"Entry point for a new observer plugin, triggers on almost all events related to text chat"
function handle_observer end #I suggest renaming handlers to observers since they act on observations

end

I wonder if we even need the separation between command and observer here.

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