aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | | | | | | HelpChannels: implement move_to_availableGravatar MarkKoz2020-03-22-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves a channel to the Available category. Permissions will be synced with the new category. * Add stubs for channel topic constants
| * | | | | | | HelpChannels: implement get_available_candidateGravatar MarkKoz2020-03-22-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a dormant channel to turn into an available channel, waiting indefinitely until one becomes available in the queue.
| * | | | | | | HelpChannels: implement create_dormantGravatar MarkKoz2020-03-22-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | HelpChannels: implement get_idle_timeGravatar MarkKoz2020-03-22-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | HelpChannels: make move_idle_channels only handle a single channelGravatar MarkKoz2020-03-22-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | HelpChannels: fix creation of queues in init_cogGravatar MarkKoz2020-03-22-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove await from create_channel_queue * Call the correct function to create the name queue
| * | | | | | | HelpChannels: implement move_idle_channelsGravatar MarkKoz2020-03-22-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | Constants: add a named tuple for scheduled task dataGravatar MarkKoz2020-03-22-2/+9
| | | | | | | |
| * | | | | | | Constants: implement init_availableGravatar MarkKoz2020-03-22-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialises the Available category with channels if any are missing.
| * | | | | | | Constants: add a help channel name prefix constantGravatar MarkKoz2020-03-22-1/+5
| | | | | | | |
| * | | | | | | HelpChannels: implement create_channel_queueGravatar MarkKoz2020-03-22-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.
| * | | | | | | HelpChannels: only yield text channels from a categoryGravatar MarkKoz2020-03-22-2/+2
| | | | | | | |
| * | | | | | | HelpChannels: retrieve category channels more efficientlyGravatar MarkKoz2020-03-22-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The channels property of categories sorts the channels before returning them. * Add a generator function to get category channels
| * | | | | | | HelpChannels: implement create_name_queueGravatar MarkKoz2020-03-22-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It returns a queue of element names to use for creating new channels, taking into account which names are already being used.
| * | | | | | | HelpChannels: add a function to return used channel namesGravatar MarkKoz2020-03-22-0/+13
| | | | | | | |
| * | | | | | | HelpChannels: set a ready event when cog initialisation completesGravatar MarkKoz2020-03-22-0/+3
| | | | | | | |
| * | | | | | | HelpChannels: cancel the init task when unloading the cogGravatar MarkKoz2020-03-22-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will prevent initialisation from proceeding when the category channels fail to be retrieved.
| * | | | | | | HelpChannels: add a function to initialise the cogGravatar MarkKoz2020-03-22-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's created as a task in __init__ because coroutines cannot be awaited in there.
| * | | | | | | HelpChannels: add a function to init the categoriesGravatar MarkKoz2020-03-22-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.
| * | | | | | | HelpChannels: add a function to get a channel or fetch it from APIGravatar MarkKoz2020-03-22-0/+8
| | | | | | | |
| * | | | | | | HelpChannels: add a loggerGravatar MarkKoz2020-03-22-0/+3
| | | | | | | |
| * | | | | | | HelpChannels: add method stubsGravatar MarkKoz2020-03-22-1/+48
| | | | | | | |
| * | | | | | | Constants: add help category constantsGravatar MarkKoz2020-03-22-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.
| * | | | | | | HelpChannels: add constants for active/dormant messagesGravatar MarkKoz2020-03-22-0/+24
| | | | | | | |
| * | | | | | | Constants: add constants for HelpChannels cogGravatar MarkKoz2020-03-22-0/+19
| | | | | | | |
| * | | | | | | HelpChannels: load element names from JSONGravatar MarkKoz2020-03-22-0/+7
| | | | | | | |
| * | | | | | | HelpChannels: create boilerplate extension and cogGravatar MarkKoz2020-03-22-0/+12
| | | | | | | |
| * | | | | | | Resources: add JSON with array of chemical element namesGravatar MarkKoz2020-03-22-0/+120
| | | | | | | |
| | | | | | | * Infraction Tests: Small fixesGravatar ks1292020-05-20-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove unnecessary space from placeholder - Rename `has_active_infraction` to `get_active_infraction`
| | | | | | | * ModLog Tests: Fix truncation tests docstringGravatar ks1292020-05-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Leon Sandøy <[email protected]>
| | | | | | | * (Infractions and ModLog Tests): Replaced `shortening` with `truncation`, ↵Gravatar ks1292020-04-16-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | removed unnecessary type hint and added comment to kick truncation test about awaiting `kick`.
| | | | | | | * (ModLog): Removed unused `textwrap` import.Gravatar ks1292020-04-16-1/+0
| | | | | | | |
| | | | | | | * (ModLog Tests): Created reason shortening tests for `send_log_message`.Gravatar ks1292020-04-16-0/+29
| | | | | | | |
| | | | | | | * (Infraction Tests): Created reason shortening tests for ban and kick.Gravatar ks1292020-04-16-0/+54
| | | | | | | |
| | | | | | | * (Test Helpers): Added `__ge__` function to `MockRole` for comparing.Gravatar ks1292020-04-15-0/+4
| | | | | | | |
| | | | | | | * (Scheduler): Added removal of infraction in DB, when applying infraction ↵Gravatar ks1292020-04-14-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fail. Also don't send DM in this case.
| | | | | | | * (Scheduler): Removed empty line when expiration not specified in ↵Gravatar ks1292020-04-14-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `apply_infraction`.
| | | | | | | * (ModLog): Applied force embed description truncating in `send_log_message` ↵Gravatar ks1292020-04-14-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to avoid removing newlines.
| | | | | | | * (Big Brother): Added truncating reason.Gravatar ks1292020-04-09-2/+3
| | | | | | | |
| | | | | | | * (Watchchannel): Added footer shortening.Gravatar ks1292020-04-09-1/+2
| | | | | | | |
| | | | | | | * (Talent Pool): Applied reason shortening.Gravatar ks1292020-04-09-5/+5
| | | | | | | |
| | | | | | | * (Scheduler): Replaced `infraction['reason']` with `reason` variable using in ↵Gravatar ks1292020-04-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `end_msg`.
| | | | | | | * (Scheduler): Move reason to end of log text to avoid truncating keys.Gravatar ks1292020-04-09-2/+7
| | | | | | | |
| | | | | | | * (Mod Utils): Moved embed description to variable.Gravatar ks1292020-04-09-5/+7
| | | | | | | |
| | | | | | | * (Superstarify): Removed unnecessary truncation on `superstarify` command, ↵Gravatar ks1292020-04-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reordered ModLog text.
| | | | | | | * (Mod Utils): Removed truncation of reason itself and added truncation to ↵Gravatar ks1292020-04-08-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | whole embed in `notify_infraction`.
| | | | | | | * (Scheduler): Removed reason truncation from `apply_infraction`, changed ↵Gravatar ks1292020-04-08-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order of ModLog embed description item in same function.
| | | | | | | * (ModLog): Added mod log item embed description truncating when it's too long.Gravatar ks1292020-04-08-1/+2
| | | | | | | |
| | | | | | | * (Scheduler): Changed reason truncating in `apply_infraction` from 1900 chars ↵Gravatar ks1292020-04-08-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to 1500, added shortening to end message too.
| | | | | | | * (Superstarify, Scheduler): Added reason shortening for ModLog.Gravatar ks1292020-04-08-2/+2
| | | | | | | |