From 4610483e28100b4f3943612981000a9e8707e802 Mon Sep 17 00:00:00 2001 From: Steele Date: Mon, 26 Oct 2020 10:02:46 -0400 Subject: Made the message significantly shorter --- bot/resources/tags/codeblock.md | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/bot/resources/tags/codeblock.md b/bot/resources/tags/codeblock.md index a28ae397b..2982984a3 100644 --- a/bot/resources/tags/codeblock.md +++ b/bot/resources/tags/codeblock.md @@ -1,17 +1,7 @@ -Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you. +Here's how to format Python code on Discord: -To do this, use the following method: - -\```python +\```py print('Hello world!') \``` -Note: -• **These are backticks, not quotes.** Backticks can usually be found on the tilde key. -• You can also use py as the language instead of python -• The language must be on the first line next to the backticks with **no** space between them - -This will result in the following: -```py -print('Hello world!') -``` +**These are backticks, not quotes.** Backticks can usually be found to the left of the `1` key. -- cgit v1.2.3 From 8acd7e1544d89e4d71ad078824787f0f193e882b Mon Sep 17 00:00:00 2001 From: Steele Farnsworth <32915757+swfarnsworth@users.noreply.github.com> Date: Mon, 26 Oct 2020 10:37:08 -0400 Subject: link to a page about finding the backtick key on different layouts. --- bot/resources/tags/codeblock.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/codeblock.md b/bot/resources/tags/codeblock.md index 2982984a3..8b5b3047c 100644 --- a/bot/resources/tags/codeblock.md +++ b/bot/resources/tags/codeblock.md @@ -4,4 +4,4 @@ Here's how to format Python code on Discord: print('Hello world!') \``` -**These are backticks, not quotes.** Backticks can usually be found to the left of the `1` key. +**These are backticks, not quotes.** See [here](https://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows/254077#254077) if you can't find the backtick key. -- cgit v1.2.3 From 20275fe06a1b72329eca03b3a6ba1b559f47dc6d Mon Sep 17 00:00:00 2001 From: Steele Farnsworth <32915757+swfarnsworth@users.noreply.github.com> Date: Tue, 27 Oct 2020 10:23:11 -0400 Subject: "see here" -> "check this out" --- bot/resources/tags/codeblock.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/resources/tags/codeblock.md b/bot/resources/tags/codeblock.md index 8b5b3047c..8d48bdf06 100644 --- a/bot/resources/tags/codeblock.md +++ b/bot/resources/tags/codeblock.md @@ -4,4 +4,4 @@ Here's how to format Python code on Discord: print('Hello world!') \``` -**These are backticks, not quotes.** See [here](https://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows/254077#254077) if you can't find the backtick key. +**These are backticks, not quotes.** Check [this](https://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows/254077#254077) out if you can't find the backtick key. -- cgit v1.2.3 From c8c58b7283d201a3efb0524b11591b6ed7e4f3c0 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Tue, 27 Oct 2020 11:37:31 -0700 Subject: Fix incorrect argument for _send_log when filtering evals Fixes BOT-AN --- bot/exts/filters/filtering.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index 92cdfb8f5..208fc9e1f 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -246,7 +246,7 @@ class Filtering(Cog): filter_triggered = True stats = self._add_stats(filter_name, match, result) - await self._send_log(filter_name, _filter["type"], msg, stats, is_eval=True) + await self._send_log(filter_name, _filter, msg, stats, is_eval=True) break # We don't want multiple filters to trigger -- cgit v1.2.3 From bbf7a600ca4b657258b46074c00cab1982791613 Mon Sep 17 00:00:00 2001 From: Andi Qu <31325319+dolphingarlic@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:26:09 +0200 Subject: Update bot/exts/info/code_snippets.py Co-authored-by: Mark --- bot/exts/info/code_snippets.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py index 1bb00b677..4594c36f2 100644 --- a/bot/exts/info/code_snippets.py +++ b/bot/exts/info/code_snippets.py @@ -49,8 +49,7 @@ class CodeSnippets(Cog): def _find_ref(self, path: str, refs: tuple) -> tuple: """Loops through all branches and tags to find the required ref.""" # Base case: there is no slash in the branch name - ref = path.split('/')[0] - file_path = '/'.join(path.split('/')[1:]) + ref, file_path = path.split('/', 1) # In case there are slashes in the branch name, we loop through all branches and tags for possible_ref in refs: if path.startswith(possible_ref['name'] + '/'): -- cgit v1.2.3 From 1b8610c83dacfe1b19f3efa5d3a2b66c4c6e1e5d Mon Sep 17 00:00:00 2001 From: Andi Qu <31325319+dolphingarlic@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:31:01 +0200 Subject: Removed unnecessary space before equals sign --- bot/exts/info/code_snippets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py index 4594c36f2..d854ebb4c 100644 --- a/bot/exts/info/code_snippets.py +++ b/bot/exts/info/code_snippets.py @@ -49,7 +49,7 @@ class CodeSnippets(Cog): def _find_ref(self, path: str, refs: tuple) -> tuple: """Loops through all branches and tags to find the required ref.""" # Base case: there is no slash in the branch name - ref, file_path = path.split('/', 1) + ref, file_path = path.split('/', 1) # In case there are slashes in the branch name, we loop through all branches and tags for possible_ref in refs: if path.startswith(possible_ref['name'] + '/'): -- cgit v1.2.3