| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Keeping examples consistent will hopefully make things clearer to the
user.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Add named capture groups to the regex
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Remove has_bad_ticks - it's obsolete
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
No longer used anywhere.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This reduces clutter in the cog. The cog should only have Discord-
related functionality.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Create a `NamedTuple` representing a code block
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It was missing a quantifier to match more than 1 character.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Rename `howto` variable to `description`
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reduces nesting for improved readability. The code would have never
thrown a syntax error in the manner expected anyway.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* Check for bot author first because it's a simpler/faster check
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It was really out of place in the BotCog, which is meant more for
general, simple utility commands.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| |\ \ \ \ \ \ \ |
|
| |/ / / / / / / |
|
| |\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Duckpond: Add a list of already ducked messages
|
| | |\ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add Metricity DB URL env var to site (docker-compose.yml)
|
| | |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
| | | | | | | | | | |
|
| | |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Previously race conditions caused the messages to be processed again before
knowing the white check mark reaction got added, this seems to solve it
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Smart syncing of Users
|
| | |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ |
|
| | |\ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
|