A discord.py extension including useful tools for bot development and debugging.
Project description
jishaku
a debugging and utility extension for discord.py bots
Read the documentation online.
jishaku is an extension for bot developers that enables rapid prototyping, experimentation, and debugging of features for bots.
One of jishaku's core philosophies is to be dynamic and easy-to-use. Here's the two step install:
- Download jishaku on the command line using pip:
pip install -U jishaku
- Load the extension in your bot code before it runs:
bot.load_extension('jishaku') # or await bot.load_extension('jishaku')That's it!
You can also import the module to use the command development utilities.
Index
Command reference
|
|
>
|
_ctx |
The Context that invoked the command. |
_bot |
The running Bot instance. |
_author_channel_guild_me_message_msg |
Shortcuts for attributes on _ctx.
|
_find_get |
Shortcuts for discord.utils functions.
|
The underscore prefix on the provided variables is intended to help prevent shadowing when writing large blocks of code within the command.
If you decide that you don't want the prefix, you can disable it by setting the
JISHAKU_NO_UNDERSCORE environment variable to true.
Each Python command is individually scoped. That means variables you create won't be retained in later invocations.
You can use
jishaku retain on to change this behavior and retain variables, and jishaku retain off if you change your mind later.
> jishaku [dis|disassemble] <argument>
This command compiles Python code in an asynchronous context, and then disassembles the resulting function into Python bytecode in the style of dis.dis.
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.
> jishaku ast <argument>
This command compiles Python code into its Abstract Syntax Tree, and then displays it as a formatted tree of AST blocks.
|
|
>
The shell command executes commands within your system shell.
|
|
|
>
|
|
|
>
This command reads a file from your file system, automatically detecting encoding and (if applicable) highlighting.
|
|
|
>
|
Installing development versions
If you'd like to test the latest versions of jishaku, you can do so by downloading from the git hosts instead of from PyPI.
From GitHub:
pip install -U "jishaku @ git+https://github.com/scarletcafe/jishaku@master"From GitLab:
pip install -U "jishaku @ git+https://gitlab.com/scarletcafe/jishaku@master"
Please note that the new 2020 dependency resolver now no longer discounts git package sources from reinstall prevention, which 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.
If you run into such a problem, you can force jishaku to be reinstalled like this:
From GitHub:
pip install -U --force-reinstall "jishaku @ git+https://github.com/scarletcafe/jishaku@master"From GitLab:
pip install -U --force-reinstall "jishaku @ git+https://gitlab.com/scarletcafe/jishaku@master"
You must have installed jishaku with one of the commands above before doing this else you will probably end up with a broken installation.
Acknowledgements
The documentation and this README uses icons from the Material Design Icon library, which is licensed under the Apache License Version 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jishaku-2.6.3.tar.gz.
File metadata
- Download URL: jishaku-2.6.3.tar.gz
- Upload date:
- Size: 75.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b1b91981b6809f68645a16ebc56492c868d4ff1e72566e54fe4bbf43f00a603
|
|
| MD5 |
ee76144a425d2f89ba6775de5d093353
|
|
| BLAKE2b-256 |
ac4e1b846182ba10f1989187dab75503fb5c56f69afd71b267aecb07c614a7c5
|
Provenance
The following attestation bundles were made for jishaku-2.6.3.tar.gz:
Publisher:
deploy.yml on scarletcafe/jishaku
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jishaku-2.6.3.tar.gz -
Subject digest:
5b1b91981b6809f68645a16ebc56492c868d4ff1e72566e54fe4bbf43f00a603 - Sigstore transparency entry: 622515369
- Sigstore integration time:
-
Permalink:
scarletcafe/jishaku@b5ff8aabc13a5bd56b9aca6a36c8554e23c756cd -
Branch / Tag:
refs/tags/2.6.3 - Owner: https://github.com/scarletcafe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@b5ff8aabc13a5bd56b9aca6a36c8554e23c756cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file jishaku-2.6.3-py3-none-any.whl.
File metadata
- Download URL: jishaku-2.6.3-py3-none-any.whl
- Upload date:
- Size: 81.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96ea7c4564b6bc3910b829be71889b837b0384b263a922512afd1ee0036f7c74
|
|
| MD5 |
0aa4e36885961de27997072b6d6547ee
|
|
| BLAKE2b-256 |
75e3703b6e4f49b16957626a47df3bbc3344d13ef9122ed2848836bd05a1b69f
|
Provenance
The following attestation bundles were made for jishaku-2.6.3-py3-none-any.whl:
Publisher:
deploy.yml on scarletcafe/jishaku
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jishaku-2.6.3-py3-none-any.whl -
Subject digest:
96ea7c4564b6bc3910b829be71889b837b0384b263a922512afd1ee0036f7c74 - Sigstore transparency entry: 622515370
- Sigstore integration time:
-
Permalink:
scarletcafe/jishaku@b5ff8aabc13a5bd56b9aca6a36c8554e23c756cd -
Branch / Tag:
refs/tags/2.6.3 - Owner: https://github.com/scarletcafe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@b5ff8aabc13a5bd56b9aca6a36c8554e23c756cd -
Trigger Event:
push
-
Statement type: