{"id":17858518,"url":"https://github.com/scarletcafe/jishaku","last_synced_at":"2025-04-14T20:43:38.043Z","repository":{"id":37432390,"uuid":"110757396","full_name":"scarletcafe/jishaku","owner":"scarletcafe","description":"A debugging and testing cog for discord.py rewrite bots.","archived":false,"fork":false,"pushed_at":"2024-10-24T12:36:52.000Z","size":2009,"stargazers_count":550,"open_issues_count":23,"forks_count":186,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T01:24:35.799Z","etag":null,"topics":["discord-api","discord-py","discord-py-rewrite","jishaku","python-3","python-3-10","python-3-11","python-3-12","python3","python310","python311","python312"],"latest_commit_sha":null,"homepage":"https://jishaku.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scarletcafe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"scarletcafe","patreon":null,"open_collective":null,"ko_fi":"scarletcafe","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-11-14T23:34:45.000Z","updated_at":"2025-03-05T01:54:42.000Z","dependencies_parsed_at":"2023-01-29T17:31:22.232Z","dependency_job_id":"706eeba7-ca9a-44f8-8fd4-3bc4f5513226","html_url":"https://github.com/scarletcafe/jishaku","commit_stats":{"total_commits":519,"total_committers":31,"mean_commits":"16.741935483870968","dds":"0.10404624277456642","last_synced_commit":"49374cf4541b4d72778fd24f1191d3f29cf5d67c"},"previous_names":["scarletcafe/jishaku"],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarletcafe%2Fjishaku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarletcafe%2Fjishaku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarletcafe%2Fjishaku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scarletcafe%2Fjishaku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scarletcafe","download_url":"https://codeload.github.com/scarletcafe/jishaku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248960137,"owners_count":21189979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord-api","discord-py","discord-py-rewrite","jishaku","python-3","python-3-10","python-3-11","python-3-12","python3","python310","python311","python312"],"created_at":"2024-10-28T05:09:06.824Z","updated_at":"2025-04-14T20:43:38.018Z","avatar_url":"https://github.com/scarletcafe.png","language":"Python","funding_links":["https://github.com/sponsors/scarletcafe","https://ko-fi.com/scarletcafe"],"categories":[],"sub_categories":[],"readme":"[![Python versions](https://img.shields.io/pypi/pyversions/jishaku.svg)](https://pypi.python.org/pypi/jishaku)\n[![License](https://img.shields.io/pypi/l/jishaku.svg)](https://github.com/scarletcafe/jishaku/blob/master/LICENSE)\n[![Status](https://img.shields.io/pypi/status/jishaku.svg)](https://pypi.python.org/pypi/jishaku)\n[![Issues](https://img.shields.io/github/issues/scarletcafe/jishaku.svg?colorB=3333ff)](https://github.com/scarletcafe/jishaku/issues)\n[![Commit activity](https://img.shields.io/github/commit-activity/w/scarletcafe/jishaku.svg)](https://github.com/scarletcafe/jishaku/commits)\n\n***\n\n\u003ch1 align=\"center\"\u003e\n\u003csub\u003e\n    \u003cimg src=\".github/assets/jishaku_logo.svg\" height=\"36\"\u003e\n\u003c/sub\u003e\n\u0026nbsp;\njishaku\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n\u003csup\u003e\na debugging and utility extension for discord.py bots\n\u003c/sup\u003e\n\u003cbr\u003e\n\u003csup\u003e\n    \u003ca href=\"https://jishaku.readthedocs.io/\"\u003eRead the documentation online.\u003c/a\u003e\n\u003c/sup\u003e\n\u003c/p\u003e\n\n***\n\njishaku is an extension for bot developers that enables rapid prototyping, experimentation, and debugging of features for bots.\n\nOne of jishaku's core philosophies is to be dynamic and easy-to-use. Here's the two step install:\n\n\u003e 1. Download jishaku on the command line using pip:\n\u003e ```bash\n\u003e pip install -U jishaku\n\u003e ```\n\u003e 2. Load the extension in your bot code before it runs:\n\u003e ```python\n\u003e bot.load_extension('jishaku')\n\u003e # or\n\u003e await bot.load_extension('jishaku')\n\u003e ```\n\u003e That's it!\n\nYou can also import the module to use the command development utilities.\n\n## Index\n\n* [Command reference](#command-reference)\n* [Installing development versions](#installing-development-versions)\n* [Acknowledgements](#acknowledgements)\n\n## Command reference\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"60px\"\u003e\n            \u003cimg align=\"left\" width=\"50\" src=\".github/assets/python_logo.svg\"\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku [py|python] \u0026lt;argument\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku [pyi|python_inspect] \u0026lt;argument\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            The Python commands execute or evaluate Python code passed into them.\n            It supports simple expressions:\n            \u003cbr\u003e\u003cbr\u003e \u003c!-- Horrifying that I have to do this --\u003e\n            \u003cblockquote\u003e\n                \u003cp\u003e\u0026gt;  \u003ci\u003ejsk py 3+4\u003c/i\u003e\u003c/p\u003e\n                \u003cimg align=\"left\" width=\"50\" height=\"50\" src=\".github/assets/beep_bot.svg\"\u003e\n                    \u003cp\u003e\u003cb\u003eBeep Bot\u003c/b\u003e\u003c/p\u003e\n                    7\n            \u003c/blockquote\u003e\n            \u003cbr\u003e\n            It also supports async expressions:\n            \u003cbr\u003e\u003cbr\u003e\n            \u003cblockquote\u003e\n                \u003cp\u003e\u0026gt;  \u003ci\u003ejsk py await _ctx.pins()\u003c/i\u003e\u003c/p\u003e\n                \u003cimg align=\"left\" width=\"50\" height=\"50\" src=\".github/assets/beep_bot.svg\"\u003e\n                    \u003cp\u003e\u003cb\u003eBeep Bot\u003c/b\u003e\u003c/p\u003e\n                    [\u0026lt;Message id=123456789012345678 ...\u0026gt;, ...]\n            \u003c/blockquote\u003e\n            \u003cbr\u003e\n            You can pass in codeblocks for longer blocks of code to execute, and you can use \u003ccode\u003eyield\u003c/code\u003e to return intermediate results within your processing.\n            \u003cbr\u003e\u003cbr\u003e\n            The \u003ci\u003einspect\u003c/i\u003e variant of the command will return a codeblock with detailed inspection information on all objects returned.\n            \u003cbr\u003e\u003cbr\u003e\n            The variables available by default in all execution contexts are:\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ctable\u003e\n                \u003ctr\u003e\n                    \u003ctd\u003e\u003ccode\u003e_ctx\u003c/code\u003e\u003c/td\u003e\n                    \u003ctd\u003e\n                        The \u003ca href=\"https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context\"\u003eContext\u003c/a\u003e that invoked the command.\n                    \u003c/td\u003e\n                \u003c/tr\u003e\n                \u003ctr\u003e\n                    \u003ctd\u003e\u003ccode\u003e_bot\u003c/code\u003e\u003c/td\u003e\n                    \u003ctd\u003e\n                        The running \u003ca href=\"https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot\"\u003eBot\u003c/a\u003e instance.\n                    \u003c/td\u003e\n                \u003c/tr\u003e\n                \u003ctr\u003e\n                    \u003ctd\u003e\u003ccode\u003e_author\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e_channel\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e_guild\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e_me\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e_message\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e_msg\u003c/code\u003e\u003c/td\u003e\n                    \u003ctd\u003e\n                        Shortcuts for attributes on \u003ca href=\"https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context\"\u003e\u003ccode\u003e_ctx\u003c/code\u003e\u003c/a\u003e.\n                    \u003c/td\u003e\n                \u003c/tr\u003e\n                \u003ctr\u003e\n                    \u003ctd\u003e\u003ccode\u003e_find\u003c/code\u003e\u003cbr\u003e\u003ccode\u003e_get\u003c/code\u003e\u003c/td\u003e\n                    \u003ctd\u003e\n                        Shortcuts for \u003ca href=\"https://discordpy.readthedocs.io/en/latest/api.html#utility-functions\"\u003e\u003ccode\u003ediscord.utils\u003c/code\u003e\u003c/a\u003e functions.\n                    \u003c/td\u003e\n                \u003c/tr\u003e\n            \u003c/table\u003e\n            \u003cbr\u003e\n            The underscore prefix on the provided variables is intended to help prevent shadowing when writing large blocks of code within the command.\n            \u003cbr\u003e\n            If you decide that you don't want the prefix, you can disable it by setting the \u003ccode\u003eJISHAKU_NO_UNDERSCORE\u003c/code\u003e environment variable to \u003ccode\u003etrue\u003c/code\u003e.\n            \u003cbr\u003e\u003cbr\u003e\n            Each Python command is individually scoped. That means variables you create won't be retained in later invocations.\n            \u003cbr\u003e\n            You can use \u003ccode\u003ejishaku retain on\u003c/code\u003e to change this behavior and retain variables, and \u003ccode\u003ejishaku retain off\u003c/code\u003e if you change your mind later.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku [dis|disassemble] \u0026lt;argument\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            This command compiles Python code in an asynchronous context, and then disassembles the resulting function into Python bytecode in the style of \u003ccode\u003edis.dis\u003c/code\u003e.\n            \u003cbr\u003e\u003cbr\u003e\n            This allows you to quickly and easily determine the bytecode that results from a given expression or piece of code. The code itself is not actually executed.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku ast \u0026lt;argument\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            This command compiles Python code into its Abstract Syntax Tree, and then displays it as a formatted tree of AST blocks.\n            \u003cbr\u003e\u003cbr\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"60px\"\u003e\n            \u003cimg align=\"left\" width=\"50\" src=\".github/assets/terminal.svg\"\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku [sh|shell] \u0026lt;argument\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            The shell command executes commands within your system shell.\n            \u003cbr\u003e\u003cbr\u003e\n            If you're on Linux and are using a custom shell, jishaku will obey the \u003ccode\u003eSHELL\u003c/code\u003e environment variable, otherwise, it will use \u003ccode\u003e/bin/bash\u003c/code\u003e.\n            \u003cbr\u003e\n            On Windows, jishaku will use PowerShell if it's detected, otherwise, it will use Command Prompt.\n            \u003cbr\u003e\u003cbr\u003e\n            The results from the commands you pass in are returned through a paginator interface live as the command runs. If you need to stop a command, you can press the stop button reaction, or use \u003ccode\u003ejsk cancel\u003c/code\u003e.\n            \u003cbr\u003e\u003cbr\u003e\n            The execution will terminate automatically if no output is produced for 120 seconds.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku git \u0026lt;argument\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku pip \u0026lt;argument\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            These commands act as shortcuts to the shell command, so you can save typing a word if you use these frequently.\n            \u003cbr\u003e\u003cbr\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"60px\"\u003e\n            \u003cimg align=\"left\" width=\"50\" src=\".github/assets/extension.svg\"\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku [load|reload] [extensions...]\u003c/code\u003e\u003c/h4\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku unload [extensions...]\u003c/code\u003e\u003c/h4\u003e\n            These commands load, reload, or unload extensions on your bot.\n            \u003cbr\u003e\u003cbr\u003e\n            You can reload jishaku itself with \u003ccode\u003ejsk reload jishaku\u003c/code\u003e.\n            \u003cbr\u003e\n            \u003ccode\u003ejsk reload ~\u003c/code\u003e will reload all extensions on your bot.\n            \u003cbr\u003e\u003cbr\u003e\n            You can load, reload, or unload multiple extensions at once: \u003ccode\u003ejsk reload cogs.one cogs.two\u003c/code\u003e\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku shutdown\u003c/code\u003e\u003c/h4\u003e\n            This command gracefully shuts down your bot.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku rtt\u003c/code\u003e\u003c/h4\u003e\n            This command calculates \u003ca href=\"https://en.wikipedia.org/wiki/Round-trip_delay\"\u003eRound-Trip Time\u003c/a\u003e for your bot to the API. It does this by calculating response time samples, so you can tell if your bot is being slow or not.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku sync [guild_ids...]\u003c/code\u003e\u003c/h4\u003e\n            This command syncs the app_command tree for a list of guilds, or globally if none are given, and then reports the results.\n            \u003cbr\u003e\u003cbr\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"60px\"\u003e\n            \u003cimg align=\"left\" width=\"50\" src=\".github/assets/description.svg\"\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku cat \u0026lt;file\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            This command reads a file from your file system, automatically detecting encoding and (if applicable) highlighting.\n            \u003cbr\u003e\u003cbr\u003e\n            You can use this to read things like bot logs or source files in your project.\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku curl \u0026lt;url\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            This command reads text from a URL and attempts to detect encoding and language, similar to \u003ccode\u003ejsk cat\u003c/code\u003e.\n            \u003cbr\u003e\u003cbr\u003e\n            You can use this to display contents of files online, for instance, the \u003ccode\u003emessage.txt\u003c/code\u003e files created when a message is too long, or raw files from paste sites.\n            \u003cbr\u003e\u003cbr\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"60px\"\u003e\n            \u003cimg align=\"left\" width=\"50\" src=\".github/assets/chat.svg\"\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku exec [member and/or channel...] \u0026lt;command string\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku debug \u0026lt;command string\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku repeat \u0026lt;times\u0026gt; \u0026lt;command string\u0026gt;\u003c/code\u003e\u003c/h4\u003e\n            These commands serve as command control for other commands.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ccode\u003ejishaku exec\u003c/code\u003e allows you to execute a command as another user, in another channel, or both. Using aliases with a postfix exclamation mark (such as \u003ccode\u003ejsk exec! ...\u003c/code\u003e) executes the command bypassing checks and cooldowns.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ccode\u003ejishaku debug\u003c/code\u003e executes a command with an exception wrapper and a timer. This allows you to quickly get feedback on reproducable command errors and slowdowns.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ccode\u003ejishaku repeat\u003c/code\u003e repeats a command a number of times.\n            \u003cbr\u003e\u003cbr\u003e\n            \u003ch4\u003e\u0026gt; \u003ccode\u003ejishaku permtrace \u0026lt;channel\u0026gt; [targets...]\u003c/code\u003e\u003c/h4\u003e\n            This command allows you to investigate the source of expressed permissions in a given channel. Targets can be either a member, or a list of roles (to simulate a member with those roles).\n            \u003cbr\u003e\u003cbr\u003e\n            It will read all of the guild permissions and channel overwrites for the given member or roles in the channel, and provide a breakdown containing whether the permission is granted, and the most fundamental reason why.\n            \u003cbr\u003e\u003cbr\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Installing development versions\n\nIf you'd like to test the latest versions of jishaku, you can do so by downloading from the git hosts instead of from PyPI.\n\n\u003e From GitHub:\n\u003e ```bash\n\u003e pip install -U \"jishaku @ git+https://github.com/scarletcafe/jishaku@master\"\n\u003e ```\n\u003e From GitLab:\n\u003e ```bash\n\u003e pip install -U \"jishaku @ git+https://gitlab.com/scarletcafe/jishaku@master\"\n\u003e ```\n\nPlease note that the new 2020 dependency resolver now no longer discounts git package sources from reinstall prevention,\nwhich means that if you are installing the jishaku development version multiple times within the same version target you may run into pip just discarding the update.\n\nIf you run into such a problem, you can force jishaku to be reinstalled like this:\n\n\u003e From GitHub:\n\u003e ```bash\n\u003e pip install -U --force-reinstall \"jishaku @ git+https://github.com/scarletcafe/jishaku@master\"\n\u003e ```\n\u003e From GitLab:\n\u003e ```bash\n\u003e pip install -U --force-reinstall \"jishaku @ git+https://gitlab.com/scarletcafe/jishaku@master\"\n\u003e ```\n\nYou **must** have installed jishaku with one of the commands above before doing this else you will probably end up with a broken installation.\n\n## Acknowledgements\n\nThe documentation and this README uses icons from the \u003ca href=\"https://github.com/google/material-design-icons\"\u003eMaterial Design Icon\u003c/a\u003e library, which is licensed under the \u003ca href=\"https://www.apache.org/licenses/LICENSE-2.0.html\"\u003eApache License Version 2.0\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarletcafe%2Fjishaku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscarletcafe%2Fjishaku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscarletcafe%2Fjishaku/lists"}