%global _empty_manifest_terminate_build 0 Name: python-disnake-jishaku Version: 2.6.5 Release: 1 Summary: A disnake extension including useful tools for bot development and debugging. License: MIT URL: https://github.com/Kraots/jishaku Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6a/1e/44d9685500d6c5e231bc543d30203400fcba78563372bad6caa53889d568/disnake-jishaku-2.6.5.tar.gz BuildArch: noarch %description [![Python versions](https://img.shields.io/pypi/pyversions/jishaku.svg)](https://pypi.python.org/pypi/jishaku) [![License](https://img.shields.io/pypi/l/jishaku.svg)](https://github.com/Kraots/jishaku/blob/master/LICENSE) [![Status](https://img.shields.io/pypi/status/jishaku.svg)](https://pypi.python.org/pypi/jishaku) ***

  disnake-jishaku

a debugging and utility extension for disnake bots

*** disnake-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: > 1. Download disnake-jishaku on the command line using pip: > ```bash > pip install -U disnake-jishaku > ``` > 2. Load the extension in your bot code before it runs: > ```python > bot.load_extension('jishaku') > ``` > That's it! You can also import the module to use the command development utilities. ## Index - [Index](#index) - [Command reference](#command-reference) - [Installing development versions](#installing-development-versions) - [Embedded JSK](#embedded-jsk) - [Disabling the automatic result handle from "jsk py"](#disabling-the-automatic-result-handle-from-jsk-py) - [Acknowledgements](#acknowledgements) ## Command reference

> jishaku [py|python] <argument>

> jishaku [pyi|python_inspect] <argument>

The Python commands execute or evaluate Python code passed into them. It supports simple expressions:

> jsk py 3+4

Beep Bot

7

It also supports async expressions:

> jsk py await _ctx.pins()

Beep Bot

[<Message id=123456789012345678 ...>, ...]

You can pass in codeblocks for longer blocks of code to execute, and you can use yield to return intermediate results within your processing.

The inspect variant of the command will return a codeblock with detailed inspection information on all objects returned.

The variables available by default in all execution contexts are:

_ctx The Context that invoked the command.
_bot The running Bot instance.
_author
_channel
_guild
_message
_msg
Shortcuts for attributes on _ctx.
_find
_get
Shortcuts for disnake.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 [sh|shell] <argument>

The shell command executes commands within your system shell.

If you're on Linux and are using a custom shell, jishaku will obey the SHELL environment variable, otherwise, it will use /bin/bash.
On Windows, jishaku will use PowerShell if it's detected, otherwise, it will use Command Prompt.

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 jsk cancel.

The execution will terminate automatically if no output is produced for 120 seconds.

> jishaku git <argument>

> jishaku pip <argument>

These commands act as shortcuts to the shell command, so you can save typing a word if you use these frequently.

> jishaku [load|reload] [extensions...]

> jishaku unload [extensions...]

These commands load, reload, or unload extensions on your bot.

You can reload jishaku itself with jsk reload jishaku.
jsk reload ~ will reload all extensions on your bot.

You can load, reload, or unload multiple extensions at once: jsk reload cogs.one cogs.two

> jishaku shutdown

This command gracefully shuts down your bot.

> jishaku rtt

This command calculates Round-Trip Time 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.

> jishaku cat <file>

This command reads a file from your file system, automatically detecting encoding and (if applicable) highlighting.

You can use this to read things like bot logs or source files in your project.

> jishaku curl <url>

This command reads text from a URL and attempts to detect encoding and language, similar to jsk cat.

You can use this to display contents of files online, for instance, the message.txt files created when a message is too long, or raw files from paste sites.

> jishaku exec [member and/or channel...] <command string>

> jishaku debug <command string>

> jishaku repeat <times> <command string>

These commands serve as command control for other commands.

jishaku exec allows you to execute a command as another user, in another channel, or both. Using aliases with a postfix exclamation mark (such as jsk exec! ...) executes the command bypassing checks and cooldowns.

jishaku debug executes a command with an exception wrapper and a timer. This allows you to quickly get feedback on reproducable command errors and slowdowns.

jishaku repeat repeats a command a number of times.

> jishaku permtrace <channel> [targets...]

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).

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.

## Installing development versions If you'd like to test the latest versions of disnake-jishaku, you can do so by downloading from the git hosts instead of from PyPI. > From GitHub: > ```bash > pip install -U "jishaku @ git+https://github.com/Kraots/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: > ```bash > pip install -U --force-reinstall "jishaku @ git+https://github.com/Kraots/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. ## Embedded JSK ```py import os # Setting the jsk command to return an embed os.environ['JISHAKU_EMBEDDED_JSK'] = 'true' # Setting the embed's colour # Acceptable formats: # 0x # # # 0x# # rgb(, , ) # Any of the classmethod in disnake.Colour os.environ['JISHAKU_EMBEDDED_JSK_COLOUR'] = 0x2F3136 ``` ## Disabling the automatic result handle from "jsk py" Aditionally, you can also remove the result handle from the `jsk py`, what that means is that it will only send the message of your result if you are returning something, it will not send embeds, files, or anything else automatically like it did before. This option is enabled by default, you can enable it by adding `os.environ['JISHAKU_PY_RES'] = 'false'` in your code. ## Acknowledgements The documentation and this README uses icons from the Material Design Icon library, which is licensed under the Apache License Version 2.0. %package -n python3-disnake-jishaku Summary: A disnake extension including useful tools for bot development and debugging. Provides: python-disnake-jishaku BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-disnake-jishaku [![Python versions](https://img.shields.io/pypi/pyversions/jishaku.svg)](https://pypi.python.org/pypi/jishaku) [![License](https://img.shields.io/pypi/l/jishaku.svg)](https://github.com/Kraots/jishaku/blob/master/LICENSE) [![Status](https://img.shields.io/pypi/status/jishaku.svg)](https://pypi.python.org/pypi/jishaku) ***

  disnake-jishaku

a debugging and utility extension for disnake bots

*** disnake-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: > 1. Download disnake-jishaku on the command line using pip: > ```bash > pip install -U disnake-jishaku > ``` > 2. Load the extension in your bot code before it runs: > ```python > bot.load_extension('jishaku') > ``` > That's it! You can also import the module to use the command development utilities. ## Index - [Index](#index) - [Command reference](#command-reference) - [Installing development versions](#installing-development-versions) - [Embedded JSK](#embedded-jsk) - [Disabling the automatic result handle from "jsk py"](#disabling-the-automatic-result-handle-from-jsk-py) - [Acknowledgements](#acknowledgements) ## Command reference

> jishaku [py|python] <argument>

> jishaku [pyi|python_inspect] <argument>

The Python commands execute or evaluate Python code passed into them. It supports simple expressions:

> jsk py 3+4

Beep Bot

7

It also supports async expressions:

> jsk py await _ctx.pins()

Beep Bot

[<Message id=123456789012345678 ...>, ...]

You can pass in codeblocks for longer blocks of code to execute, and you can use yield to return intermediate results within your processing.

The inspect variant of the command will return a codeblock with detailed inspection information on all objects returned.

The variables available by default in all execution contexts are:

_ctx The Context that invoked the command.
_bot The running Bot instance.
_author
_channel
_guild
_message
_msg
Shortcuts for attributes on _ctx.
_find
_get
Shortcuts for disnake.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 [sh|shell] <argument>

The shell command executes commands within your system shell.

If you're on Linux and are using a custom shell, jishaku will obey the SHELL environment variable, otherwise, it will use /bin/bash.
On Windows, jishaku will use PowerShell if it's detected, otherwise, it will use Command Prompt.

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 jsk cancel.

The execution will terminate automatically if no output is produced for 120 seconds.

> jishaku git <argument>

> jishaku pip <argument>

These commands act as shortcuts to the shell command, so you can save typing a word if you use these frequently.

> jishaku [load|reload] [extensions...]

> jishaku unload [extensions...]

These commands load, reload, or unload extensions on your bot.

You can reload jishaku itself with jsk reload jishaku.
jsk reload ~ will reload all extensions on your bot.

You can load, reload, or unload multiple extensions at once: jsk reload cogs.one cogs.two

> jishaku shutdown

This command gracefully shuts down your bot.

> jishaku rtt

This command calculates Round-Trip Time 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.

> jishaku cat <file>

This command reads a file from your file system, automatically detecting encoding and (if applicable) highlighting.

You can use this to read things like bot logs or source files in your project.

> jishaku curl <url>

This command reads text from a URL and attempts to detect encoding and language, similar to jsk cat.

You can use this to display contents of files online, for instance, the message.txt files created when a message is too long, or raw files from paste sites.

> jishaku exec [member and/or channel...] <command string>

> jishaku debug <command string>

> jishaku repeat <times> <command string>

These commands serve as command control for other commands.

jishaku exec allows you to execute a command as another user, in another channel, or both. Using aliases with a postfix exclamation mark (such as jsk exec! ...) executes the command bypassing checks and cooldowns.

jishaku debug executes a command with an exception wrapper and a timer. This allows you to quickly get feedback on reproducable command errors and slowdowns.

jishaku repeat repeats a command a number of times.

> jishaku permtrace <channel> [targets...]

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).

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.

## Installing development versions If you'd like to test the latest versions of disnake-jishaku, you can do so by downloading from the git hosts instead of from PyPI. > From GitHub: > ```bash > pip install -U "jishaku @ git+https://github.com/Kraots/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: > ```bash > pip install -U --force-reinstall "jishaku @ git+https://github.com/Kraots/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. ## Embedded JSK ```py import os # Setting the jsk command to return an embed os.environ['JISHAKU_EMBEDDED_JSK'] = 'true' # Setting the embed's colour # Acceptable formats: # 0x # # # 0x# # rgb(, , ) # Any of the classmethod in disnake.Colour os.environ['JISHAKU_EMBEDDED_JSK_COLOUR'] = 0x2F3136 ``` ## Disabling the automatic result handle from "jsk py" Aditionally, you can also remove the result handle from the `jsk py`, what that means is that it will only send the message of your result if you are returning something, it will not send embeds, files, or anything else automatically like it did before. This option is enabled by default, you can enable it by adding `os.environ['JISHAKU_PY_RES'] = 'false'` in your code. ## Acknowledgements The documentation and this README uses icons from the Material Design Icon library, which is licensed under the Apache License Version 2.0. %package help Summary: Development documents and examples for disnake-jishaku Provides: python3-disnake-jishaku-doc %description help [![Python versions](https://img.shields.io/pypi/pyversions/jishaku.svg)](https://pypi.python.org/pypi/jishaku) [![License](https://img.shields.io/pypi/l/jishaku.svg)](https://github.com/Kraots/jishaku/blob/master/LICENSE) [![Status](https://img.shields.io/pypi/status/jishaku.svg)](https://pypi.python.org/pypi/jishaku) ***

  disnake-jishaku

a debugging and utility extension for disnake bots

*** disnake-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: > 1. Download disnake-jishaku on the command line using pip: > ```bash > pip install -U disnake-jishaku > ``` > 2. Load the extension in your bot code before it runs: > ```python > bot.load_extension('jishaku') > ``` > That's it! You can also import the module to use the command development utilities. ## Index - [Index](#index) - [Command reference](#command-reference) - [Installing development versions](#installing-development-versions) - [Embedded JSK](#embedded-jsk) - [Disabling the automatic result handle from "jsk py"](#disabling-the-automatic-result-handle-from-jsk-py) - [Acknowledgements](#acknowledgements) ## Command reference

> jishaku [py|python] <argument>

> jishaku [pyi|python_inspect] <argument>

The Python commands execute or evaluate Python code passed into them. It supports simple expressions:

> jsk py 3+4

Beep Bot

7

It also supports async expressions:

> jsk py await _ctx.pins()

Beep Bot

[<Message id=123456789012345678 ...>, ...]

You can pass in codeblocks for longer blocks of code to execute, and you can use yield to return intermediate results within your processing.

The inspect variant of the command will return a codeblock with detailed inspection information on all objects returned.

The variables available by default in all execution contexts are:

_ctx The Context that invoked the command.
_bot The running Bot instance.
_author
_channel
_guild
_message
_msg
Shortcuts for attributes on _ctx.
_find
_get
Shortcuts for disnake.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 [sh|shell] <argument>

The shell command executes commands within your system shell.

If you're on Linux and are using a custom shell, jishaku will obey the SHELL environment variable, otherwise, it will use /bin/bash.
On Windows, jishaku will use PowerShell if it's detected, otherwise, it will use Command Prompt.

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 jsk cancel.

The execution will terminate automatically if no output is produced for 120 seconds.

> jishaku git <argument>

> jishaku pip <argument>

These commands act as shortcuts to the shell command, so you can save typing a word if you use these frequently.

> jishaku [load|reload] [extensions...]

> jishaku unload [extensions...]

These commands load, reload, or unload extensions on your bot.

You can reload jishaku itself with jsk reload jishaku.
jsk reload ~ will reload all extensions on your bot.

You can load, reload, or unload multiple extensions at once: jsk reload cogs.one cogs.two

> jishaku shutdown

This command gracefully shuts down your bot.

> jishaku rtt

This command calculates Round-Trip Time 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.

> jishaku cat <file>

This command reads a file from your file system, automatically detecting encoding and (if applicable) highlighting.

You can use this to read things like bot logs or source files in your project.

> jishaku curl <url>

This command reads text from a URL and attempts to detect encoding and language, similar to jsk cat.

You can use this to display contents of files online, for instance, the message.txt files created when a message is too long, or raw files from paste sites.

> jishaku exec [member and/or channel...] <command string>

> jishaku debug <command string>

> jishaku repeat <times> <command string>

These commands serve as command control for other commands.

jishaku exec allows you to execute a command as another user, in another channel, or both. Using aliases with a postfix exclamation mark (such as jsk exec! ...) executes the command bypassing checks and cooldowns.

jishaku debug executes a command with an exception wrapper and a timer. This allows you to quickly get feedback on reproducable command errors and slowdowns.

jishaku repeat repeats a command a number of times.

> jishaku permtrace <channel> [targets...]

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).

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.

## Installing development versions If you'd like to test the latest versions of disnake-jishaku, you can do so by downloading from the git hosts instead of from PyPI. > From GitHub: > ```bash > pip install -U "jishaku @ git+https://github.com/Kraots/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: > ```bash > pip install -U --force-reinstall "jishaku @ git+https://github.com/Kraots/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. ## Embedded JSK ```py import os # Setting the jsk command to return an embed os.environ['JISHAKU_EMBEDDED_JSK'] = 'true' # Setting the embed's colour # Acceptable formats: # 0x # # # 0x# # rgb(, , ) # Any of the classmethod in disnake.Colour os.environ['JISHAKU_EMBEDDED_JSK_COLOUR'] = 0x2F3136 ``` ## Disabling the automatic result handle from "jsk py" Aditionally, you can also remove the result handle from the `jsk py`, what that means is that it will only send the message of your result if you are returning something, it will not send embeds, files, or anything else automatically like it did before. This option is enabled by default, you can enable it by adding `os.environ['JISHAKU_PY_RES'] = 'false'` in your code. ## Acknowledgements The documentation and this README uses icons from the Material Design Icon library, which is licensed under the Apache License Version 2.0. %prep %autosetup -n disnake-jishaku-2.6.5 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-disnake-jishaku -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed May 17 2023 Python_Bot - 2.6.5-1 - Package Spec generated