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
Eva Maria Telegram Bot

Eva Maria Bot Features Auto Filter Manuel Filter IMDB Admin Commands Broadcast Index IMDB search Inline Search Random pics ids and User info Stats, Us

Eva Maria TG 477 Dec 31, 2022
Discord Blogger Integration Using Blogger API

It's a very simple discord bot created in python using blogger api in order to search and send your website articles in your discord chat in form of an embedded message. It's pretty useful for people

Owen Singh 8 Oct 28, 2022
Discord Token Checker and Info

Discord Token Checker A simple way to check Discord user tokens and their info in bulk. By Roover#7098. https://discord.gg/W8hnMWY6XP Proxy support co

Roover 3 Dec 09, 2021
Student-Management-System-in-Python - Student Management System in Python

Student-Management-System-in-Python Student Management System in Python

G.Niruthian 3 Jan 01, 2022
An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% API coverage Most of the codebase is documented

7 Dec 11, 2022
Binance Futures Client

Binance Futures Client

4 Aug 02, 2022
This is a repository for the Duke University Cloud Computing course project on Serveless Data Engineering Pipeline. For this project, I recreated the below pipeline.

AWS Data Engineering Pipeline This is a repository for the Duke University Cloud Computing course project on Serverless Data Engineering Pipeline. For

15 Jul 28, 2021
A Code that can make your Discord Account 24/7!

Online-Forever Make your Discord Account Online 24/7! A Code written in Python that helps you to keep your account 24/7. The main.py is the main file.

Phantom 556 Dec 29, 2022
The elegance of Airflow + the power of AWS

Orkestra The elegance of Airflow + the power of AWS

Stephan Fitzpatrick 42 Nov 01, 2022
The public discord bot, created by: primitt, further developed by: duino-coin team.

Duino Stats Mini A public Duino-Stats Discord bot. Click this link to invite the bot to your server. License Duino Stats Mini distributed under the MI

primboi 8 Mar 14, 2022
TwitterBot-ImageCollector - Twitter bot that collects images from likes saves the image

TwitterBot-ImageCollector Bot de Twitter que recolecta imagenes a partir de los

Gx3 Studios 4 Jun 01, 2022
A Telegram Bot written in Python for mirroring files on the Internet to your Google Drive

No support is going to be provided of any kind, only maintaining this for vps user on request. This is a Telegram Bot written in Python for mirroring

Sunil Kumar 42 Oct 28, 2022
To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window

To dynamically change the split direction in I3/Sway so as to split new windows automatically based on the width and height of the focused window Insp

Ritin George 6 Mar 11, 2022
E-Commerce Telegram Bot for UCA Students

ucaStudentStore To buy from and sell to other students Features Register the first time, after that you will always be recognised You can login either

Shukur Sabzaliev 5 Jun 26, 2022
un outil pour bypasser les code d'รฉtats HTTP nรฉgatif cotรฉ client ( 4xx )

4xxBypasser un outil pour bypasser les code d'รฉtats HTTP nรฉgatif cotรฉ client ( 4xx ) Liscence : MIT license Creator Installation : git clone https://g

21 Dec 25, 2022
Coinbase Listing Sniper

Coinbase Listing Sniper Script that listens to the @CoinbaseAssets twitter to find information about new Coinbase listings, and automatically buys 100

4 Oct 26, 2022
471 Dec 24, 2022
DonLee Robot

๐Ÿค– ๐ƒ๐Ž๐ ๐‹๐„๐„ ๐‘๐Ž๐๐Ž๐“ ๐•๐Ÿ ๐Ÿค– ๐Ÿ‘‹ Hey Muhammed, Iam DonLee RoBoT Make me an admin for your group and channel then connect me.... ๐ŸŽ‰ ๐Ÿ™‚ To build a

Muhammed 27 Dec 01, 2022
Send SMS text messages via email with as many accounts as you want :)

SMS-Spammer Send SMS text messages via email with as many accounts as you want :) Example Set Up Guide! To start log into the gmail account you would

Riceblades11 10 Oct 25, 2022
Balanced API library in python.

Balanced Online Marketplace Payments v1.x requires Balanced API 1.1. Use v0.x for Balanced API 1.0. Installation pip install balanced Usage View Bala

Balanced 70 Oct 04, 2022