aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | * | | | | | | | ModLog: Fix embed description truncationGravatar ks1292020-05-20-1/+1
| | | | | | | | | | |
| | | * | | | | | | | Infractions: Remove space from placeholderGravatar ks1292020-05-20-1/+1
| | | | | | | | | | |
| | | * | | | | | | | Merge branch 'master' into ban-kick-reason-lengthGravatar ks1292020-05-20-870/+2369
| | | |\ \ \ \ \ \ \ \
| | | * | | | | | | | | 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
| | | | | | | | | | | |
| | | * | | | | | | | | (Infractions): Moved truncated reason to variable instead on ban coroutine ↵Gravatar ks1292020-04-08-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | creating.
| | | * | | | | | | | | (Infractions): Removed unnecessary logging that notify when reason will be ↵Gravatar ks1292020-04-08-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | truncated for Audit Log.
| | | * | | | | | | | | (Mod Utils): Added shortening reason on embed creation in `notify_infraction`.Gravatar ks1292020-04-08-1/+1
| | | | | | | | | | | |
| | | * | | | | | | | | (Ban and Kick): Added space to `textwrap.shorten` `placeholder`.Gravatar ks1292020-04-06-1/+1
| | | | | | | | | | | |
| | | * | | | | | | | | (Ban and Kick): Changed length in `textwrap.shorten` from 309 to 312 because ↵Gravatar ks1292020-04-06-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shorten already include `placeholder` to length.
| | | * | | | | | | | | (Mod Scheduler): Added reason truncations to Scheduler's `apply_infraction`Gravatar ks1292020-04-05-1/+2
| | | | | | | | | | | |
| | | * | | | | | | | | (Ban and Kick): Applied simplification to reason truncating.Gravatar ks1292020-04-05-2/+2
| | | | | | | | | | | |
| | | * | | | | | | | | (Ban and Kick): Replaced force reason truncating with `textwrap.shorten`.Gravatar ks1292020-04-04-2/+3
| | | | | | | | | | | |
| | | * | | | | | | | | (Kick Command): Added logging and truncating to correct length for Discord ↵Gravatar ks1292020-04-04-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Audit Log when kick reason length is more than 512 characters.
| | | * | | | | | | | | (Banning): Added logging and truncating to correct length for Discord Audit ↵Gravatar ks1292020-04-04-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log when ban reason length is more than 512 characters.
| | | | | | | | * | | | Move counting of channels to a separate methodGravatar MarkKoz2020-05-30-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This de-clutters the main `server_info` function and improves its readability.
| | | | | | | | * | | | Simplify counting of staff channels and improve efficiencyGravatar MarkKoz2020-05-30-49/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplification comes from being able to access permissions as attributes on the overwrite object. This removes the need to iterate all permissions. Efficiency comes from checking all roles within a single iteration of all channels. This also removes the need to flatten and filter the channels afterwards, which required additional iterations.
| | | | | | | | * | | | Merge branch 'master' into staff_count_serverGravatar Leon Sandøy2020-05-30-1/+1
| | | | | | | | |\ \ \ \ | | |_|_|_|_|_|_|/ / / / | |/| | | | | | | | | |
| * | | | | | | | | | | Merge pull request #972 from Numerlor/tag-encodingGravatar Mark2020-05-29-1/+1
| |\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / / / | |/| | | | | | | | | | Specify encoding when reading tag files
| | * | | | | | | | | | Tags: explicitly use UTF-8 to read filesGravatar MarkKoz2020-05-30-1/+1
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all operating systems use UTF-8 as the default encoding. For systems that don't, reading tag files with Unicode would cause an unhandled exception. (cherry picked from commit adc75ff9bbcf8b905bd78c78f253522ae5e42fc3)
| | | | | | | * | | | Don't membership check in an itertools.chain.Gravatar Leon Sandøy2020-05-30-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're using the set comprehension to prevent duplicates anyway, so flipping these back makes more sense. Also added a missing ctx and tested ok.
| | | | | | | * | | | Prevent duplicates, and break into function.Gravatar Leon Sandøy2020-05-30-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We're using a set comprehension and flipping the order for counting the number of channels that are both staff allow and @everyone deny. - We're breaking the staff channel count stuff into a separate helper function so it doesn't crowd the server_info() scope. These fixes are both to address the code review from @MarkKoz, thanks Mark.
| | | | | | | * | | | Fix busted test_information test.Gravatar Leon Sandøy2020-05-30-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wish this test didn't exist.
| | | | | | | * | | | More precise staff-channel check.Gravatar Leon Sandøy2020-05-30-13/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now check: - Does the @everyone role have explicit read deny permissions? - Do staff roles have explicit read allow permissions? If the answer to both of these are yes, it's a staff channel. By 'staff roles', I mean Helpers, Moderators or Admins.
| | | | | | | * | | | Merge branch 'master' into staff_count_serverGravatar Leon Sandøy2020-05-30-0/+1
| | | | | | | |\ \ \ \ | | |_|_|_|_|_|/ / / / | |/| | | | | | | | |
| * | | | | | | | | | Merge pull request #965 from Akarys42/patch-1Gravatar Dennis Pham2020-05-29-0/+1
| |\ \ \ \ \ \ \ \ \ \ | | |_|_|_|/ / / / / / | |/| | | | | | | | | Ignore response when posting python news
| | * | | | | | | | | Merge branch 'master' into patch-1Gravatar Dennis Pham2020-05-29-31/+8
| | |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | |
| | * | | | | | | | | Ignore response when posting python newsGravatar Matteo Bertucci2020-05-29-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes a mailing list user doesn't press respond correctly to the email, and so a response is sent as a separate thread. To keep only new threads in the channel, we need to ignore those.
| | | | | | | * | | | Adding staff member count to !server.Gravatar Leon Sandøy2020-05-30-4/+10
| | | | | | | | | | |
| | | | | | | * | | | Clean up channel counts and add staff channels.Gravatar Leon Sandøy2020-05-29-2/+22
| | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up a particularly dirty line by turning it into like 10 lines, and also adding the number of channels that are hidden to the `@everyone` role - which we're classifying as "Staff channels".