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
Python tool to Check running WebClient services on multiple targets based on @leechristensen

WebClient Service Scanner Python tool to Check running WebClient services on multiple targets based on @tifkin_ idea. This tool uses impacket project.

Pixis 153 Dec 28, 2022
Python script to harvest tweets with the Twitter API V2 Academic Research Product Track

Tweet harvester Python script to scrape, collect, and/or harvest tweets with the Twitter API V2 Academic Research Product Track. Important note: In or

Thomas Frissen 2 Nov 11, 2021
Discord bot for playing blindfold chess.

Albin Discord bot for playing blindfold chess written in Python. Albin takes the moves from chat and pushes them on the board without showing it. TODO

8 Oct 14, 2022
A minimalistic, modern Discord bot for roles and polls using dropdowns

DropBot A minimalistic, modern Discord bot for roles and polls using dropdowns Made by ThatOneCalculator Technologies used Instructions Type /, and na

ModernBots 1 Jun 27, 2022
A Telegram Bot which notifies the user when a vaccine is available on CoWin Platform.

Cowin Vaccine Availability Notifier Telegram Bot A bot that notifies the available vaccines at given district in realtime. Introduction • Requirements

Arham Shah 7 Jul 31, 2021
A Python script to backup all repos (public or private) of a user.

GithubBackupAllRepos A Python script to backup all repos (public or private) of a user. Features Clone public and private repos Load specified SSH key

Podalirius 15 Jan 03, 2023
Raid ToolBox (RTB) is a big toolkit of Spamming/Raiding/Token management tools for discord.

This code is very out of date and not very good, feel free to make it into something better. (we check the github page every 5 years to pulls your PRs

2 Oct 03, 2021
A program used to create accounts in bulk, still a work in progress as of now.

Discord Account Creator This project is still a work in progress. It will be published upon its full completion. About This project is still under dev

patched 8 Sep 15, 2022
Automatically searching for vaccine appointments

Vaccine Appointments Automatically searching for vaccine appointments Usage To copy this package, run: git clone https://github.com/TheIronicCurtain/v

58 Apr 13, 2021
allow windows programs to call dssp/mkdssp command from wsl; rework biopython on windows (PDB -> dssp -> fasta)

dssp-wsl Converting PDB (Protein Data Bank) file format to DSSP file format is required for generating datasets of peptides and their secondary struct

Taine Zhao 1 Feb 23, 2022
Hcl.py is an Amino client for Python

Hcl.py Hcl.py Hcl.py is an Amino client for Python. It provides to access aminoapps Web, app and socket servers. Developed BY Kapidev And Upgraded BY

Oustex 3 Dec 02, 2021
Fully Dockerized cryptocurrencies Trading Bot, based on Freqtrade engine. Multi instances.

Cryptocurrencies Trading Bot - Freqtrade Manager This automated Trading Bot is based on the amazing Freqtrade one. It allows you to manage many Freqtr

Cédric Dugat 47 Dec 06, 2022
A simple script that will watch a stream for you and earn the channel points.

Credits Main idea: https://github.com/gottagofaster236/Twitch-Channel-Points-Miner Bet system (Selenium): https://github.com/ClementRoyer/TwitchAutoCo

Alessandro Maggio 1.1k Jan 08, 2023
A new coin listing alert bot using Python, Flask, MongoDB, Telegram API and Binance API

Bzzmans New Coin Listing Detection Bot Architecture About Project Work in progress. This bot basically gets new coin listings from Binance using Binan

Eyüp Barlas 21 May 31, 2022
Stream Telegram files to web

Telegram File Stream Bot A Telegram bot to stream files to web Demo Bot » Report a Bug | Request Feature Table of Contents About this Bot Original Rep

Wrench 572 Jan 09, 2023
The official Magenta Voice Skill SDK used to develop skills for the Magenta Voice Assistant using Voice Platform!

Magenta Voice Skill SDK Development • Support • Contribute • Contributors • Licensing Magenta Voice Skill SDK for Python is a package that assists in

Telekom Open Source Software 18 Nov 19, 2022
Python lib to control HottoH based stove devices

Project desciption This library can be used to discuss with HootoH based stove devices Actually tested and validated with a CMG Drum stove. To use thi

3 May 16, 2022
This is a discord bot, which tells you food recipes.

Discord Chef Bot You have a friend, familiy or other group / channel where the topic is the food? You cannot really decide what's for Saturday lunch?

2 Apr 25, 2022
A Telegram bot for Download songs in mp3 format from YouTube and Extract lyrics from Genius.com ❤️

MeudsaMusic A Telegram bot for Download songs in mp3 format from YouTube and Extract lyrics from Genius.com ❤️ Commands Reach @MedusaMusic on Telegram

Bibee 14 Oct 06, 2022
Request based Python module(s) to help with the Newegg raffle.

Newegg Shuffle Python module(s) to help you with the Newegg raffle How to use $ git clone https://github.com/Matthew17-21/Newegg-Shuffle $ cd Newegg-S

Matthew 45 Dec 01, 2022