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
Automatically deploy freqtrade to a remote Docker host and auto update strategies.

Freqtrade Automatically deploy freqtrade to a remote Docker host and auto update strategies. I've been using it to automatically deploy to vultr, but

p-zombie 109 Jan 07, 2023
์นผ๋งŒ ํ•„ํ„ฐ๋Š” ์–ด๋ ต์ง€ ์•Š์•„(์ €์ž ๊น€์„ฑํ•„) ํŒŒ์ด์ฌ ์ฝ”๋“œ(Unofficial)

KalmanFilter_Python ์นผ๋งŒ ํ•„ํ„ฐ๋Š” ์–ด๋ ต์ง€ ์•Š์•„(์ €์ž ๊น€์„ฑํ•„) ์ฑ…์„ ๊ณต๋ถ€ํ•˜๋ฉด์„œ, Matlab ์ฝ”๋“œ๋ฅผ Python์œผ๋กœ ๋ณ€ํ™˜ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. Contents Part01. Recursive Filter Chapter01. Average Filter Chapter0

Donghun Park 20 Oct 28, 2022
Group Chat Spammer For Discord

Group Chat Spammer For Discord Free and public gc spammer

Dreamy 20 Dec 27, 2022
Boto is a Python package that provides interfaces to Amazon Web Services.

Boto is a Python package that provides interfaces to Amazon Web Services.

the boto project 6.5k Jan 01, 2023
A multi-purpose Discord bot with simple moderation commands, reaction roles, reminders, and much more!

Nokari This is the rewrite of Nokari. There are still a lot of things to be done. I'm still working on the internal logic, so the bot basically has no

Norizon 13 Nov 17, 2022
The programm for collecting data from Tinkoff API and building Excel table.

tinkproject The program for portfolio analysis via Tinkoff API Hello! This is my first project, please, don't judge me. This project was developed for

214 Dec 02, 2022
Python library to interact with a Z-Wave JS server.

zwave-js-server-python Python library for communicating with zwave-js-server. Goal for this library is to replicate the structure and the events of Z-

Home Assistant Libraries 54 Dec 18, 2022
This checks that your credit card is valid or not

Credit_card_Validator This checks that your credit card is valid or not. Where is the app ? main.exe is the application to run and main.py is the file

Ritik Ranjan 1 Dec 21, 2021
A updated and improved version from the original Discord-Netflix from Nirewen.

Discord-Netflix A updated version from the original Discord-Netflix from nirewen A Netflix wrapper that uses Discord RPC to show what you're watching

Void 42 Jan 02, 2023
WhatSender is a python package that allows you to send Whatsapp messages at a given time.

WhatSender is a python package that allows you to send Whatsapp messages at a given time.

IdoBarel 0 Apr 21, 2022
Lambda-function - Python codes that allow notification of changes made to some services using the AWS Lambda Function

AWS Lambda Function This repository contains python codes that allow notificatio

Elif Apaydฤฑn 3 Feb 11, 2022
Network simulation tools

Overview I'm building my network simulation environments with Vagrant using libvirt plugin on a Ubuntu 20.04 system... and I always hated how boring i

Ivan Pepelnjak 219 Jan 07, 2023
ImaginaryTicketing is a simple ticketing system for running CTF Competitions on discord.

ImaginaryTicketing ImaginaryTicketing is a simple ticketing system for running CTF Competitions on discord. Be sure to checkout ImaginaryCTF. See docs

GudOreos 8 Jul 18, 2022
Python client for QIWI payment system

Pyqiwi Lib for QIWI payment system Installation pip install pyqiwi Usage from decimal import Decimal from datetime import datetime, timedelta from p

Andrey 12 Jun 03, 2022
A Python Program to determine Degree of Profanity of Tweets

tweetx tweetx is a program to detect racial slurs in Twitter Tweets. Racial Abuse on Twitter is becoming quite a serious issue in recent times. tweetx

Kartik Poojari 3 Nov 11, 2021
A chatbot that helps you set price alerts for your amazon products.

Amazon Price Alert Bot Description A Telegram chatbot that helps you set price alerts for amazon products. The bot checks the price of your watchliste

Rittik Basu 24 Dec 29, 2022
A Bot that Forwards Tweets to Telegram using Airtable as a database.

Twitter Telegram Forward A Bot that Forwards Tweets to Telegram using Airtable as a Database. Features: Handles multiple twitter and telegram channels

George Bakev 3 Dec 21, 2022
A python package for fetching informations from GitHub API

Py-GitHub A python package for fetching informations from GitHub API Made with Python3 (C) @FayasNoushad Copyright permission under MIT License Licens

Fayas Noushad 6 Nov 28, 2021
Kali Kush - Account Nuker Tool

Kali Kush - Account Nuker Tool This is a discord tool made by me, and SSL :) antho#1731 How to use? pip3 install -r requirements.txt -py kalikush.py -

ryan 3 Dec 21, 2021
This package allows interactions with the BuyCoins API.

The BuyCoins Python library allows interactions with the BuyCoins API from applications written in Python.

Abdulazeez Abdulazeez Adeshina 45 May 23, 2022