Description
Huge PR implementing webhooks via a new object structure called Panels.
Panel Object
A Panel object abstracts the lifecycle of sending, updating, deleting for a group of embeds.
Defines how fast it should be updated and when it should be deleted.
Two Panel objects are created in this PR:
CCEmbedMessage: A command channel panel designed to emulate the old 4 message 4 embed approach
CCEmbedWebhook: A command channel panel designed to use webhooks to use 4 embeds 1 message
Panel Manager Cog
A background task that executes actions in every registered panel (with the panel.process()) function).
panels are added/registered using the state_manager cog
The process function handles the updating & sending/editing of a panel.
This background task loops every second to process each panel. Each panel, in its own discretion decides to update/send its new embeds using the process function.
Trivial Changes
Player buttons now change from ▶ <-> ⏸ based on player state. (instead of being ⏯ all the time)
all embeds now include __eq__ equality checker since discord.py does not implement it itself.
some database values added/changed:
Changed webhook_message_url to webhook_url
added button_message_id
embed_factory is no longer used
Changes include
[ ] Bugfix (non-breaking change that solves an issue)
[x] New feature (non-breaking change that adds functionality)
[x] Breaking change (change that is not backwards-compatible and/or changes current functionality)
[ ] Refactor (non-breaking/breaking change that refactor the previous code base)
Description Huge PR implementing webhooks via a new object structure called Panels.
Panel Object
Panel Manager Cog
Trivial Changes
__eq__
equality checker since discord.py does not implement it itself.Changes include
Todos
Screenshots
Webhooks in action.