Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Lots of reused code #1

Open
the-emerald opened this issue May 15, 2019 · 1 comment
Open

Lots of reused code #1

the-emerald opened this issue May 15, 2019 · 1 comment

Comments

@the-emerald
Copy link
Member

Although the reactionscroll.py has a couple of overriden methods that have to be custom-defined by any module wishing to use it, the code behind on_reaction_add and on_reaction_remove, as well as a few helper functions as seen in demo.py are simply copy-pasted.

Is it possible to rework it so that a Scroller object is created inside a module, and then creates listeners? It can also contains helper functions or whatever. As I see it, right now the scroller is only tasked with creating and storing a chain of embeds, but not responsible for listening for scrolling commands.

@the-emerald
Copy link
Member Author

This goes in hand nicely with your NOAA module @hxtk, I notice that in the (pre-work) version if a second user calls another station while the first user is still scrolling, because the scroller updates to the new station, the scrollable actually changes to the second station.

If we could somehow separate the Scroller and something like a EmbedChain it would be great.

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

No branches or pull requests

1 participant