diff options
author | 2023-12-24 00:53:18 +0530 | |
---|---|---|
committer | 2023-12-23 20:23:18 +0100 | |
commit | 3fe63e0db1fd3de56bbd0d9905dcd39dd72ce42f (patch) | |
tree | 765d3bc4d51a649b4a3dcebece8861662dcf6498 | |
parent | Bump coverage from 7.3.3 to 7.3.4 (#2859) (diff) |
Overwrite pyi extension to py in code snippet cog
This will mean that when sending the snippet as a code block in Discord it will have Python code formatting
-rw-r--r-- | bot/exts/info/code_snippets.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py index dc5c2258a..a44b0c475 100644 --- a/bot/exts/info/code_snippets.py +++ b/bot/exts/info/code_snippets.py @@ -210,6 +210,9 @@ class CodeSnippets(Cog): if not is_valid_language: language = "" + if language == "pyi": + language = "py" + # Adds a label showing the file path to the snippet if start_line == end_line: ret = f"`{file_path}` line {start_line}\n" |