You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
Is your feature request related to a problem? Please describe.
As a Discord employee, I want to not have to manually have to delete and recreate certain channels from the server. Instead, I would prefer an automated service to rotate out channels on a regular basis. When a channel is recreated, I should have the option to have the bot post a message as the first thing from that thread. A recreate should be functionally identical to the client's channel clone feature.
Describe the solution you'd like
Create an automated task that runs on a schedule (e.g. every hour) and checks to see if a time precondition is met (effectively, an in-bot cron implementation). Upon the time precondition being met, check all channels (by name) that are configured to be reset. If the channel is currently over a threshold of age, clone the channel and delete the old instance of that channel.
If the channel is currently actively being used, delay the execution for a period of time such as to not interrupt the flow of conversation.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Constant Time solution is ideal (Sundays at 02:00 UTC). Check if the channel is active before deletion and postpone deletion by an hour if the channel is currently being used.
Alternate Proposed Implementation / Requests For Clarification
As an alternate to the constant time solution, I believe it would both be easier and more practical to simply use a once-an-hour job to check for deletion. This may negatively impact users, but also solves the time zone problem of 02:00 UTC being in a potentially inconvenient time by making all times potentially inconvenient.
Assuming constant time is the preferred solution, this leaves an implementation problem as discord.py (to my knowledge) has no ability to schedule tasks to be run at precise times. This means we'll have to implement one of the following solutions:
A global cron-like controller could be added with a high-precision check (runs every second)
A local cron-like controller could be added (run an event every hour, check if it's time)
Cron proper could be added to the bot's infrastructure
What should the definition of an "active channel" be? My guess would be for it to be "has had a message in the past 5 minutes" but this is open for debate.
If a channel is subsequently active for multiple time periods, should the channel be force-deleted after a while regardless of conversation state?
Is your feature request related to a problem? Please describe.
As a Discord employee, I want to not have to manually have to delete and recreate certain channels from the server. Instead, I would prefer an automated service to rotate out channels on a regular basis. When a channel is recreated, I should have the option to have the bot post a message as the first thing from that thread. A recreate should be functionally identical to the client's channel clone feature.
Describe the solution you'd like
Create an automated task that runs on a schedule (e.g. every hour) and checks to see if a time precondition is met (effectively, an in-bot
cron
implementation). Upon the time precondition being met, check all channels (by name) that are configured to be reset. If the channel is currently over a threshold of age, clone the channel and delete the old instance of that channel.If the channel is currently actively being used, delay the execution for a period of time such as to not interrupt the flow of conversation.
Additional context
N/A
The text was updated successfully, but these errors were encountered: