aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-03-22Constants: add a named tuple for scheduled task dataGravatar MarkKoz-2/+9
2020-03-22Constants: implement init_availableGravatar MarkKoz-0/+5
Initialises the Available category with channels if any are missing.
2020-03-22Constants: add a help channel name prefix constantGravatar MarkKoz-1/+5
2020-03-22HelpChannels: implement create_channel_queueGravatar MarkKoz-2/+15
It returns a queue of dormant channels in random order. The queue will be used to get the next available channel. Using a random order is simpler than trying to sort by the timestamp of the most recent message in each channel and this decision will only "negatively" impact the system when the bot restarts or the extension is reloaded. Ultimately, it just means in such events some dormant channels may chosen to become active again sooner than expected.
2020-03-22HelpChannels: only yield text channels from a categoryGravatar MarkKoz-2/+2
2020-03-22HelpChannels: retrieve category channels more efficientlyGravatar MarkKoz-7/+15
The channels property of categories sorts the channels before returning them. * Add a generator function to get category channels
2020-03-22HelpChannels: implement create_name_queueGravatar MarkKoz-1/+5
It returns a queue of element names to use for creating new channels, taking into account which names are already being used.
2020-03-22HelpChannels: add a function to return used channel namesGravatar MarkKoz-0/+13
2020-03-22HelpChannels: set a ready event when cog initialisation completesGravatar MarkKoz-0/+3
2020-03-22HelpChannels: cancel the init task when unloading the cogGravatar MarkKoz-1/+5
This will prevent initialisation from proceeding when the category channels fail to be retrieved.
2020-03-22HelpChannels: add a function to initialise the cogGravatar MarkKoz-0/+17
It's created as a task in __init__ because coroutines cannot be awaited in there.
2020-03-22HelpChannels: add a function to init the categoriesGravatar MarkKoz-0/+16
As the categories are essential for the functionality of the cog, if this function fails to get a category, it will remove/unload the cog.
2020-03-22HelpChannels: add a function to get a channel or fetch it from APIGravatar MarkKoz-0/+8
2020-03-22HelpChannels: add a loggerGravatar MarkKoz-0/+3
2020-03-22HelpChannels: add method stubsGravatar MarkKoz-1/+48
2020-03-22Constants: add help category constantsGravatar MarkKoz-3/+7
The original category was re-purposed as the "in-use" category so that deployment of the new system will not interrupt ongoing help sessions.
2020-03-22HelpChannels: add constants for active/dormant messagesGravatar MarkKoz-0/+24
2020-03-22Constants: add constants for HelpChannels cogGravatar MarkKoz-0/+19
2020-03-22HelpChannels: load element names from JSONGravatar MarkKoz-0/+7