| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When rescheduling an idle channel, the task will only be cancelled if
the function was told the channel should currently have a task
scheduled. This means warnings for missing tasks will appear when they
should.
The previous approach of checking if a task exists was flawed because
it had no way to tell whether a task *should* exist. It assumed nothing
is wrong if a task doesn't exist.
Currently, the only case when a task shouldn't exist is when the
cog is initialised and channels from the bot's previous life are being
scheduled.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The dictionary which was iterated to cancel tasks is now "private".
Therefore, the scheduler should provide a public API for cancelling
tasks.
* Delete the task before cancelling it to prevent the done callback,
however unlikely it may be, from deleting the task first
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prefixing them early on means subsequent code doesn't have to deal with
stripping the prefix from channel names in order to get their positions.
* Remove `count` parameter from `get_names`; define it in the body
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Store queue get() tasks in a list
* Create a separate function to wait for a channel from the queue
* Add comments for the various groups of attributes defined in __init__
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This gives the newest questions the most visibility.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Initialising the dictionary with help channel IDs doesn't work anymore
since help channels are now dynamic.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The notification feature is not critical for the functionality of the
help channel system. Therefore, the exception should not be allowed to
propagate and halt the system in some way.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Rename function `notify_helpers` -> `notify`
* Use bullet-point list for config options in the docstring
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* 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.
|