Maintained Fork of Jishaku For nextcord

Overview

Python versions License Status Issues Commit activity


  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:

  1. Download onami on the command line using pip:
pip install -U onami
  1. 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

> onami [py|python]

> onami [pyi|python_inspect]

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

> oni py 3+4

Beep Bot

7

It also supports async expressions:

> oni py await _ctx.pins()

Beep Bot

[ , ...]

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 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]

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.

> onami [sh|shell]

The shell command executes commands within your system shell.

If you're on Linux and are using a custom shell, onami will obey the SHELL environment variable, otherwise, it will use /bin/bash.
On Windows, onami 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 oni cancel.

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

> onami git

> onami pip

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

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

> onami unload [extensions...]

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

You can reload onami itself with oni reload onami.
oni reload ~ will reload all extensions on your bot.

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

> onami shutdown

This command gracefully shuts down your bot.

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

> onami cat

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.

> onami curl

This command reads text from a URL and attempts to detect encoding and language, similar to oni 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.

> onami exec [member and/or channel...]

> onami debug

> onami repeat

These commands serve as command control for other commands.

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

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

onami repeat repeats a command a number of times.

> onami permtrace [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 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/[email protected]"

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/[email protected]"

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.

Comments
  • fix(exc_handling): add missing `Flags` import

    fix(exc_handling): add missing `Flags` import

    Rationale

    When using 2.4.1a1, there is an error that gets raised during runtime when there is an error raised.

    Summary of changes made

    Adds the missing from .flags import Flags import as it is a missing import.

    Checklist

    • [x] This PR changes the onami module/cog codebase
      • [ ] These changes add new functionality to the module/cog
      • [x] These changes fix an issue or bug in the module/cog
      • [ ] I have tested that these changes work on a production bot codebase
      • [ ] I have tested these changes against the CI/CD test suite
      • [ ] I have updated the documentation to reflect these changes
    • [ ] This PR changes the CI/CD test suite
      • [ ] I have tested my suite changes are well-formed (all tests can be discovered)
      • [ ] These changes adjust existing test cases
      • [ ] These changes add new test cases
    • [ ] This PR changes prose (such as the documentation, README or other Markdown/RST documents)
      • [ ] I have proofread my changes for grammar and spelling issues
      • [ ] I have tested that any changes regarding Markdown/RST syntax result in a well formed document
    opened by toolifelesstocode 0
  • chore(setup): attempt at making versioning work

    chore(setup): attempt at making versioning work

    Rationale

    Currently, auto-publishing does not work, due to a version error.

    Summary of changes made

    This pull request hopefully makes the CI work again, as it excludes the git commit hash from the version. Has not been tested.

    Checklist

    • [x] This PR changes the onami module/cog codebase
      • [ ] These changes add new functionality to the module/cog
      • [ ] These changes fix an issue or bug in the module/cog
      • [ ] I have tested that these changes work on a production bot codebase
      • [ ] I have tested these changes against the CI/CD test suite
      • [ ] I have updated the documentation to reflect these changes
    • [x] This PR changes the CI/CD test suite
      • [ ] I have tested my suite changes are well-formed (all tests can be discovered)
      • [ ] These changes adjust existing test cases
      • [ ] These changes add new test cases
    • [ ] This PR changes prose (such as the documentation, README or other Markdown/RST documents)
      • [ ] I have proofread my changes for grammar and spelling issues
      • [ ] I have tested that any changes regarding Markdown/RST syntax result in a well formed document
    opened by toolifelesstocode 0
  • docs(onami): remove unecessary capitalisations

    docs(onami): remove unecessary capitalisations

    Rationale

    This pull request is being made because Vincent use to have a habit of capitalising every word in a sentence :joy:

    Summary of changes made

    This pull request removes the capitalisation of all the relevant areas where unnecessary was used.

    Checklist

    • [ ] This PR changes the onami module/cog codebase
      • [ ] These changes add new functionality to the module/cog
      • [ ] These changes fix an issue or bug in the module/cog
      • [ ] I have tested that these changes work on a production bot codebase
      • [ ] I have tested these changes against the CI/CD test suite
      • [ ] I have updated the documentation to reflect these changes
    • [ ] This PR changes the CI/CD test suite
      • [ ] I have tested my suite changes are well-formed (all tests can be discovered)
      • [ ] These changes adjust existing test cases
      • [ ] These changes add new test cases
    • [x] This PR changes prose (such as the documentation, README or other Markdown/RST documents)
      • [x] I have proofread my changes for grammar and spelling issues
      • [ ] I have tested that any changes regarding Markdown/RST syntax result in a well formed document
    opened by toolifelesstocode 0
  • Update voice.py

    Update voice.py

    Just added a little change to the warning

    Rationale

    Summary of changes made

    Checklist

    • [ ] This PR changes the onami module/cog codebase
      • [ ] These changes add new functionality to the module/cog
      • [ ] These changes fix an issue or bug in the module/cog
      • [ ] I have tested that these changes work on a production bot codebase
      • [ ] I have tested these changes against the CI/CD test suite
      • [ ] I have updated the documentation to reflect these changes
    • [ ] This PR changes the CI/CD test suite
      • [ ] I have tested my suite changes are well-formed (all tests can be discovered)
      • [ ] These changes adjust existing test cases
      • [ ] These changes add new test cases
    • [ ] This PR changes prose (such as the documentation, README or other Markdown/RST documents)
      • [ ] I have proofread my changes for grammar and spelling issues
      • [ ] I have tested that any changes regarding Markdown/RST syntax result in a well formed document
    opened by alexyy802 0
  • Name/onami

    Name/onami

    Rationale

    Summary of changes made

    Checklist

    • [ ] This PR changes the jishaku module/cog codebase
      • [ ] These changes add new functionality to the module/cog
      • [ ] These changes fix an issue or bug in the module/cog
      • [ ] I have tested that these changes work on a production bot codebase
      • [ ] I have tested these changes against the CI/CD test suite
      • [ ] I have updated the documentation to reflect these changes
    • [ ] This PR changes the CI/CD test suite
      • [ ] I have tested my suite changes are well-formed (all tests can be discovered)
      • [ ] These changes adjust existing test cases
      • [ ] These changes add new test cases
    • [ ] This PR changes prose (such as the documentation, README or other Markdown/RST documents)
      • [ ] I have proofread my changes for grammar and spelling issues
      • [ ] I have tested that any changes regarding Markdown/RST syntax result in a well formed document
    opened by VincentRPS 0
  • Add sync commands

    Add sync commands

    The Problem

    Add sync command to update application commands (updating them),because it can help us to update codes without rebooting so nextcord can sync again the commands or running an eval command to sync ,adding that command in onami will help us a lot for development.

    The Ideal Solution

    Impl it

    The Current Solution

    ..

    opened by lol219 0
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    ๐Ÿšฆ To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • .circleci/config.yml (circleci)
    • .github/workflows/python-publish.yml (github-actions)
    • .gitlab-ci.yml (gitlabci)
    • .readthedocs/requirements.txt (pip_requirements)

    Configuration

    ๐Ÿ”ก Renovate has detected a custom config for this PR. Feel free to ask for help if you have any doubts and would like it reviewed.

    Important: Now that this branch is edited, Renovate can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.

    What to Expect

    With your current configuration, Renovate will create 2 Pull Requests:

    chore(deps): update actions/checkout action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-checkout-3.x
    • Merge into: master
    • Upgrade actions/checkout to v3
    chore(deps): update actions/setup-python action to v4
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-setup-python-4.x
    • Merge into: master
    • Upgrade actions/setup-python to v4

    โš  Dependency Lookup Warnings โš 

    Please correct - or verify that you can safely ignore - these lookup failures before you merge this PR.

    • gorialis/nextcord: Response code 401 (Unauthorized)

    Files affected: .circleci/config.yml, .gitlab-ci.yml


    โ“ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
Releases(2.5.0)
  • 2.5.0(Nov 28, 2022)

    What's Changed

    • chore(setup): attempt at making versioning work by @toolifelesstocode in https://github.com/VincentRPS/Onami/pull/5

    Full Changelog: https://github.com/VincentRPS/Onami/compare/2.4.0...2.5.0

    Source code(tar.gz)
    Source code(zip)
  • 2.4.1(Nov 28, 2022)

    What's Changed

    • docs(onami): remove unecessary capitalisations by @toolifelesstocode in https://github.com/VincentRPS/Onami/pull/4

    New Contributors

    • @toolifelesstocode made their first contribution in https://github.com/VincentRPS/Onami/pull/4

    Full Changelog: https://github.com/VincentRPS/Onami/compare/2.4.0...2.4.1

    Source code(tar.gz)
    Source code(zip)
  • 2.4.0(Dec 28, 2021)

    What's Changed

    • Update voice.py by @alexyy802 in https://github.com/VincentRPS/Onami/pull/2

    New Contributors

    • @alexyy802 made their first contribution in https://github.com/VincentRPS/Onami/pull/2

    Full Changelog: https://github.com/VincentRPS/Onami/compare/2.3.3...2.4.0

    Source code(tar.gz)
    Source code(zip)
  • 2.4.0-rc1(Nov 30, 2021)

    What's Changed

    • Update voice.py by @alexyy802 in https://github.com/RPSMain/Onami/pull/2

    New Contributors

    • @alexyy802 made their first contribution in https://github.com/RPSMain/Onami/pull/2

    Full Changelog: https://github.com/RPSMain/Onami/compare/2.3.3...2.4.0-rc1

    Source code(tar.gz)
    Source code(zip)
  • 1.1.3-rc1(Nov 30, 2021)

    What's Changed

    • Update voice.py by @alexyy802 in https://github.com/RPSMain/Onami/pull/2

    New Contributors

    • @alexyy802 made their first contribution in https://github.com/RPSMain/Onami/pull/2

    Full Changelog: https://github.com/RPSMain/Onami/compare/2.3.3...1.1.3-rc1

    Source code(tar.gz)
    Source code(zip)
  • 2.3.3(Nov 23, 2021)

    What's Changed

    • Name/onami by @VincentRPS in https://github.com/VincentRPS/Onami/pull/1

    New Contributors

    • @VincentRPS made their first contribution in https://github.com/VincentRPS/Onami/pull/1

    Full Changelog: https://github.com/VincentRPS/Onami/compare/2.3.2...2.3.3

    Source code(tar.gz)
    Source code(zip)
Owner
RPS
Gamer, Coder and believer in Discord And Guilded Libraryโ€™s
RPS
Copier template for solving Advent of Code puzzles with Python

Advent of Code Python Template for Copier This template creates scaffolding for one day of Advent of Code. It includes tests and can download your per

Geir Arne Hjelle 6 Dec 25, 2022
Converts a text file of songs to a playlist on your Spotify account.

Playlist Converter Convert a text file of songs to a playlist on your Spotify account. Create your playlists faster instead of manually searching for

Priya Aggarwal 18 Dec 21, 2022
This Instagram app created as a clone of instagram.Developed during Moringa Core.

Instagram This Instagram app created as a clone of instagram.Developed during Moringa Core. AUTHOR By: Nyagah Isaac Description This web-app allows a

Nyagah Isaac 1 Nov 01, 2021
Twitter feed of newly published articles in Limnology

limnopapers Code to monitor limnology RSS feeds and tweet new articles. Scope The keywords and journal choices herein aim to focus on limnology (the s

7 Dec 20, 2022
A Telegram bot for Minecraft names

MCTelegramBot About this project This bot allows you to see data about minecraft names in Telegram, it has a few commands such as: /names - Show dropp

Kami 5 May 14, 2022
An open source, multipurpose, configurable discord bot that does it all

Spacebot - Discord Bot Music, Moderation, Fun, Utilities, Games and Fully Configurable. Overview โ€ข Contributing โ€ข Self hosting โ€ข Documentation (not re

Dhravya Shah 41 Dec 10, 2022
Pls give vaccine.

Pls Give Vaccine A script to spam yourself with vaccine notifications. Explore the docs ยป View Demo ยท Report Bug ยท Request Feature Table of Contents A

Rohan Mukherjee 3 Oct 27, 2021
Python function to construct an ODS spreadsheet on the fly - without having to store the entire file in memory or disk

stream-write-ods Python function to construct an ODS (OpenDocument Spreadsheet) on the fly - without having to store the entire file in memory or disk

Department for International Trade 1 Oct 09, 2022
Video Stream: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music

SHU KURENAI TEAM 4 Nov 05, 2022
Discord bot for calculating basic operations and formulas. (Early Development)

MathBot Discord bot for calculating basic operations and formulas. (Early Development) Commits Feel free to contribute to this bot by forking and pull

4 Jul 14, 2022
Vladilena Mirize Music - Bot Music Telegram By @zenfrans

Vladilena Mirize Music - Bot Music Telegram By @zenfrans

Wahyusaputra 3 Feb 12, 2022
A plugin for modmail-bot for stealing,making ,etc emojis

EmojiPlugin for the Modmail-bot My first plugin .. its very Basic I will make more and better too Only 3 commands for now emojiadd-supports .jpg, .png

1 Dec 28, 2021
Google Drive, OneDrive and Youtube as covert-channels - Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram

covert-control Control systems remotely by uploading files to Google Drive, OneDrive, Youtube or Telegram using Python to create the files and the lis

Ricardo Ruiz 52 Dec 06, 2022
Wrapper for Between - ๋น„ํŠธ์œˆ์„ ์œ„ํ•œ ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

PyBetween Wrapper for Between - ๋น„ํŠธ์œˆ์„ ์œ„ํ•œ ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ Legal Disclaimer ์˜ค์ง ๊ต์œก์  ๋ชฉ์ ์œผ๋กœ๋งŒ ์‚ฌ์šฉํ• ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๋น„ํŠธ์œˆ์€ VCNC์˜ ์ž์‚ฐ์ž…๋‹ˆ๋‹ค. ์•…์˜์  ๊ณต๊ฒฉ์— ์ด์šฉํ• ์‹œ ์ฒ˜๋ฒŒ ๋ฐ›์„์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ์— ๋”ฐ๋ฅธ ์ฑ…์ž„์€ ์‚ฌ์šฉ์ž๊ฐ€

1 Mar 15, 2022
Automated JSON API based communication with Fronius Symo

PyFronius - a very basic Fronius python bridge A package that connects to a Fronius device in the local network and provides data that is provided via

Niels Mรผndler 10 Dec 30, 2022
Python Discord Server Nuker

Untitled Nuker Python Discord Server Nuker Features: Ban Everyone Kick Everyone Rename Everyone Spam To All Channels Delete All Channels Delete All Ro

22 Dec 22, 2022
Secure Tunnel Manager

Making life easy of those who are in need of OpenSource alternative of AWS Secure Tunnel.

Suyash Chavan 1 Sep 27, 2022
Wakatime Response In javascript and python

Project Title Wakatime Response In javascript and python Description just for refrence Getting Started Dependencies For Python: requests json For Java

Gjenius20 1 Dec 31, 2021
An api, written in Python, for Investopedia's paper trading stock simulator.

investopedia-trading-api An API, written in Python, for Investopedia's paper trading stock simulator. Pull requests welcome. This library is now Pytho

Kirk Thaker 178 Jan 06, 2023
Twitter-Scrapping - Tweeter tweets extracting using python

Twitter-Scrapping Twitter tweets extracting using python This project is to extr

Suryadeepsinh Gohil 2 Feb 04, 2022