aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | | | | | Code block: add trace loggingGravatar MarkKoz2020-06-13-6/+48
| | | | | | |
| * | | | | | Code block: use same lang specifier as the user for the py exampleGravatar MarkKoz2020-06-13-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping examples consistent will hopefully make things clearer to the user.
| * | | | | | Code block: fix formatting of the additional messageGravatar MarkKoz2020-06-13-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newlines should be replaced with a space rather than with 1 newline. To separate the two issues, a double newline is prepended to the entire additional message.
| * | | | | | Code block: fix missing space between words in messageGravatar MarkKoz2020-06-13-1/+1
| | | | | | |
| * | | | | | Code block: fix formatting of example code blocksGravatar MarkKoz2020-06-13-4/+4
| | | | | | |
| * | | | | | Code block: fix find_code_blocks iteration and missing returnGravatar MarkKoz2020-06-13-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add named capture groups to the regex
| * | | | | | Code block: load the extensionGravatar MarkKoz2020-06-13-0/+1
| | | | | | |
| * | | | | | Code block: use find_code_blocks to check if an edited msg was fixedGravatar MarkKoz2020-06-13-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove has_bad_ticks - it's obsolete
| * | | | | | Code block: use new formatting functions in on_messageGravatar MarkKoz2020-06-13-17/+20
| | | | | | |
| * | | | | | Code block: remove truncate functionGravatar MarkKoz2020-06-13-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer used anywhere.
| * | | | | | Code block: rework the instruction formatting functionsGravatar MarkKoz2020-06-13-65/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new module, `instructions`, was created to house the functions. 4 ways in which code blocks can be incorrect are considered: 1. The code is not within a code block at all 2. Incorrect characters are used for back ticks 3. A language is not specified 4. A language is specified incorrectly Splitting it up into these 4 cases allows for more specific and relevant instructions to be shown to users. If a message has both incorrect back ticks and an issue with the language specifier, the instructions for fixing both issues are combined. The instructions show a generic code example rather than using the original code from the message. This circumvents any ambiguities when parsing their message and trying to fix it. The escaped code block also failed to preserve indentation. This was a problem because some users would copy it anyway and end up with poorly formatted code. By using a simple example that doesn't rely on indentation, it makes it clear the example is not meant to be copied. Finally, the new examples are shorter and thus make the embed not as giant.
| * | | | | | Code block: move parsing functions to a separate moduleGravatar MarkKoz2020-06-13-119/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces clutter in the cog. The cog should only have Discord- related functionality.
| * | | | | | Code block: remove obsolete functionsGravatar MarkKoz2020-06-13-108/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user's original code will not be displayed in the output so there is no longer a need for the functions which format their code.
| * | | | | | Code block: add function to check if REPL code existsGravatar MarkKoz2020-06-13-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `repl_stripping` function was re-purposed. The plan going forward is to not show the user's code in the output so actual stripping is no longer necessary.
| * | | | | | Code block: exclude code blocks 3 lines or shorterGravatar MarkKoz2020-06-13-1/+3
| | | | | | |
| * | | | | | Code block: add function to check for valid Python codeGravatar MarkKoz2020-06-13-29/+43
| | | | | | |
| * | | | | | Code block: add function to truncate contentGravatar MarkKoz2020-06-13-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was duplicated in each of the format message functions. The function also ensures content is truncated to 10 lines. Previously, code could have skipped truncating by being 100 lines long but under 204 characters in length.
| * | | | | | Code block: return code blocks with valid ticks but no langGravatar MarkKoz2020-06-13-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Such code block will be useful down the road for sending information on including a language specified if the content successfully parses as valid Python.
| * | | | | | Code block: add function to find invalid code blocksGravatar MarkKoz2020-06-13-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create a `NamedTuple` representing a code block
| * | | | | | Code block: add regex to search for any code blocksGravatar MarkKoz2020-06-13-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This regex supports both valid and invalid ticks. The ticks are in a group so it's later possible to detect if valid ones were used.
| * | | | | | Code block: fix code block language regexGravatar MarkKoz2020-06-13-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It was missing a quantifier to match more than 1 character.
| * | | | | | Code block: use a more efficient line count checkGravatar MarkKoz2020-06-13-57/+59
| | | | | | |
| * | | | | | Code block: ignore if code block has *any* languageGravatar MarkKoz2020-06-13-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the code was valid Python syntax, the guide embed would be sent despite a non-Python language being explicitly specified for the code block by the message author. * Make the code block language regex a compiled pattern constant Fixes #829
| * | | | | | Code block: simplify log messageGravatar MarkKoz2020-06-13-3/+2
| | | | | | |
| * | | | | | Code block: make invalid backticks a constant setGravatar MarkKoz2020-06-13-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A set should be faster since it's being used to test for membership. A constant just means it won't need to be redefined every time the function is called. * Make `has_bad_ticks` a static method * Add comments describing characters represented by the Unicode escapes
| * | | | | | Code block: move standard guide message creation to a new functionGravatar MarkKoz2020-06-13-50/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename `howto` variable to `description`
| * | | | | | Code block: move bad ticks message creation to a new functionGravatar MarkKoz2020-06-13-33/+37
| | | | | | |
| * | | | | | Code block: move final send/cooldown code outside the try-exceptGravatar MarkKoz2020-06-13-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduces nesting for improved readability. The code would have never thrown a syntax error in the manner expected anyway.
| * | | | | | Code block: add helper function to send the embedGravatar MarkKoz2020-06-13-7/+15
| | | | | | |
| * | | | | | Code block: invert conditions to reduce nestingGravatar MarkKoz2020-06-13-102/+107
| | | | | | |
| * | | | | | Code block: add helper function to check for channel cooldownGravatar MarkKoz2020-06-13-2/+9
| | | | | | |
| * | | | | | Code block: add helper function to check if msg should be parsedGravatar MarkKoz2020-06-13-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Check for bot author first because it's a simpler/faster check
| * | | | | | Code block: add helper function to check channel is validGravatar MarkKoz2020-06-13-5/+9
| | | | | | |
| * | | | | | Code block: add helper function to check for help channelsGravatar MarkKoz2020-06-13-5/+10
| | | | | | |
| * | | | | | Move code block formatting detection to a separate extension/cogGravatar MarkKoz2020-06-13-321/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was really out of place in the BotCog, which is meant more for general, simple utility commands.
* | | | | | | Remove trailing whitespace from verification.pyGravatar Joe Banks2020-10-13-1/+1
| | | | | | |
* | | | | | | Fix channel constantGravatar Joe Banks2020-10-13-1/+1
| | | | | | |
* | | | | | | Add production debug log for native verificationGravatar Joe Banks2020-10-13-0/+10
| | | | | | |
* | | | | | | PR #1231: Dynamic prefix in activityGravatar kwzrd2020-10-13-1/+1
|\ \ \ \ \ \ \
| * | | | | | | Fixed hardcoded prefix in __main__.pyGravatar spitfire-hash2020-10-13-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #1227 from python-discord/ducky-rescue-missionGravatar Leon Sandøy2020-10-11-1/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Duckpond: Add a list of already ducked messages
| * \ \ \ \ \ \ Merge branch 'master' into ducky-rescue-missionGravatar Leon Sandøy2020-10-11-0/+1
| |\ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge pull request #1228 from ks129/metricity-siteGravatar Dennis Pham2020-10-11-0/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add Metricity DB URL env var to site (docker-compose.yml)
| * \ \ \ \ \ \ \ Merge branch 'master' into metricity-siteGravatar Dennis Pham2020-10-11-695/+807
| |\ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
| * | | | | | | | Add Metricity DB URL to site (docker-compose.yml)Gravatar ks1292020-10-11-0/+1
| | | | | | | | |
| | * | | | | | | Duckpond: Add a list of already ducked messagesGravatar Matteo Bertucci2020-10-10-1/+3
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously race conditions caused the messages to be processed again before knowing the white check mark reaction got added, this seems to solve it
* | | | | | | | Merge pull request #1165 from RohanJnr/smart_syncing_usersGravatar Mark2020-10-08-74/+144
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Smart syncing of Users
| * \ \ \ \ \ \ \ Merge branch 'master' into smart_syncing_usersGravatar Mark2020-10-08-19/+48
| |\ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #1220 from python-discord/purgebanGravatar scragly2020-10-09-2/+26
|\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ Merge branch 'master' into purgebanGravatar scragly2020-10-09-17/+22
| |\ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | |