|  | Commit message (Collapse) | Author | Age | Lines | 
|---|
| ... |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | * Add configurable constant for minimum interval
* Move helper notifications to a separate function | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Send a message in the #helpers channel pinging the @helpers role to
notify them of a lack of help channels. Can be toggled off in the
config. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | * Log a warning if a channel lacks the expected help channel prefix
* Log the old and new channel positions | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Discord only supports 50 channels per category. The help system will
eventually error out trying to move channels if more than 50 exist. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | The channels are easier to find when sorted alphabetically.
* Merge some trace and info logs | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Discord only supports 50 channels per category.
* Add a constant for the maximum number of channels per category
* Add trace logging to `get_names` | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Makes it easier to test. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Represents the total number of help channels across all 3 categories. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | The indices will be used to sort the elements alphabetically in the
dormant category. | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Discord has a hard limit of 50 channels per category. It was decided 50
is plenty for now so no work will be done to support more than 50. | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | * Add a new function to check if a message is a dormant message | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Edits the dormant message or sends a new message if the dormant one
cannot be found. | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | * Use async_with
* Don't call acquire() | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | The task has to be created on a specific loop because when the cog is
instantiated, the event loop is not yet running. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Obsolete due to the new help channel system. | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Make a channel dormant after specified timeout or reschedule if it's
still active. | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | * Make cog_unload a regular method instead of a coroutine | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | It handles making channels in-use and replacing them with new available
channels. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | It handles moving the channel to the category and scheduling it to
be made dormant. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Basically a wrapper around move_to_dormant which ensures the current
channel is in use. If it's not in-use, from the invoker's perspective,
the command silently fails (it does at least log). InChannelCheckFailure
was considered but it seemed like it'd be too spammy, especially if
there'd be a long list of allowed channels. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Moves a channel to the Dormant category. Permissions will be synced
with the new category. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Moves a channel to the Available category. Permissions will be synced
with the new category.
* Add stubs for channel topic constants | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Return a dormant channel to turn into an available channel, waiting
indefinitely until one becomes available in the queue. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Create and return a new channel in the Dormant category or return
None if no names remain. The overwrites get synced with the category if
none are explicitly specified for the channel. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | A design change was made to account for a channel being empty i.e. no
messages ever sent. In such case, the function will return None.
* Move a channel to the Dormant category if the channel has no messages | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | This function will get re-used in _scheduled_task, but it will only
need to move a single channel. Therefore, to promote code re-use, this
change was made. The init_cog will instead do a loop to call this on
all channels in the in-use category. | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | * Remove await from create_channel_queue
* Call the correct function to create the name queue | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Make all in-use channels dormant if idle or schedule the move if still
active. This is intended to clean up the in-use channels when the bot
restarts and has lost the tasks it had scheduled in another life. | 
| | | | | | | | | |  | 
| | | | | | | | | 
| | | | | | | | 
| | | | | | | | 
| | | | | | | | | Initialises the Available category with channels if any are missing. |