Onami
a debugging and utility extension for nextcord bots
Read the documentation online.
Fork
Onami is a actively maintained fork of Jishaku for nextcord
onami is an extension for bot developers that enables rapid prototyping, experimentation, and debugging of features for bots.
One of onami's core philosophies is to be dynamic and easy-to-use. Here's the two step install:
- Download onami on the command line using pip:
pip install -U onami
- Load the extension in your bot code before it runs:
bot.load_extension('onami')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_message_msg |
Shortcuts for attributes on _ctx.
|
_find_get |
Shortcuts for nextcord.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
onami_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
onami retain on to change this behavior and retain variables, and onami retain off if you change your mind later.
> onami [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.
|
|
>
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 onami, you can do so by downloading from the git hosts instead of from PyPI.
From GitHub:
pip install -U "onami @ git+https://github.com/VincentRPS/onami@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 onami 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 onami to be reinstalled like this:
From GitHub:
pip install -U --force-reinstall "onami @ git+https://github.com/VincentRPS/onami@master"
You must have installed onami 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.
Metadata
Release files for onami 2.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| onami-2.6.3.tar.gz | 50.8 kB | Without provenance | Details |
Release files / onami-2.6.3.tar.gz
| Download URL | onami-2.6.3.tar.gz |
|---|---|
| Size | 50.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee6816ea6db2852353672f8f49bf5de6c336bcc6e300b40278ef9034826dfd0a
|
|
BLAKE2b-256 checksum How to use checksums |
e3611c57f49127a4944531c6032d1be82ca34803431911528841ace6c4cd4d32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for onami 2.6.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.