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

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
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API

pycord A fork of discord.py. PyCord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Mo

Pycord Development 2.3k Dec 31, 2022
A maintained fork of Danny's discord.py

Nextcord A modern, easy-to-use, feature-rich, and async-ready API wrapper for Discord written in Python. Fork notice This is a fork of discord.py, whi

null 977 Jan 5, 2023
Maintained wavelink fork for pycord

Pycord.Wavelink Wavelink is robust and powerful Lavalink wrapper for Pycord! Wavelink features a fully asynchronous API that's intuitive and easy to u

Pycord Development 23 Dec 11, 2022
PyDiscord, a maintained fork of discord.py, is a python wrapper for the Discord API.

discord.py A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. The Future of discord.py Please read the gi

Omkaar 1 Jan 16, 2022
The Main Pythonic Version Of Twig Using Nextcord

The Main Pythonic Version Of Twig Using Nextcord

null 8 Mar 21, 2022
Discord Mafia Game Bot using nextcord

Mafia-Bot Discord Mafia Game Bot using nextcord Features Mafia Game Game Replays Installation Run the following command to install required modules: p

Nian 6 Nov 19, 2022
Discord-Bot - Bot using nextcord for beginners

Discord-Bot Bot using nextcord for beginners! Requirements: 1 :- Install nextcord by typing "pip install nextcord" Thats it! You can use this code any

INFINITE_. 3 Jan 10, 2022
Actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs.

Twython Twython is a Python library providing an easy way to access Twitter data. Supports Python 3. It's been battle tested by companies, educational

Ryan McGrath 1.9k Jan 2, 2023
Home Assistant custom integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, officially maintained by the Tuya Developer Team.

Tuya Home Assistant Integration Home Assistant custom integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, officially mainta

Tuya 704 Jan 3, 2023
Powerful Telegram Maintained UserBot in Telethon

Fire-X UserBot The Awaited Bot Fire-X userbot The Most Powerful Telegram Userbot. This Userbot is Safe to use in Your Telegram Account. It is not like

null 22 Oct 21, 2022
DragDev Maintained Instance Of discord.py

discord.py - DragDev Flavour A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. The Future of discord.py

DragDev Studios 3 Aug 27, 2022
An API wrapper for discord; maintained and improved from discord.py

Fusion.py Documentation What is Fusion.py you might ask; Fusion.py is a Discord.py fork that has most of the good features from most of the big Discor

Senarc Studios 5 Apr 19, 2022
Elkeid HUB - A rule/event processing engine maintained by the Elkeid Team that supports streaming/offline data processing

Elkeid HUB - A rule/event processing engine maintained by the Elkeid Team that supports streaming/offline data processing

Bytedance Inc. 61 Dec 29, 2022
pymobiledevice fork with more recent coding standards and many more features

Description Features Installation Usage Sending your own messages Lockdown messages Instruments messages Example Lockdown services com.apple.instrumen

null 255 Dec 28, 2022
An Inline Telegram YouTube Downloader bot with custom, permanent thumbnail support and cancel upload facility. Make your fork now.

Inline-Tube-Mate (YouTube Downloader) An Inline Telegram bot that can download YouTube videos with permanent thumbnail support Bot need to be in Inlin

Renjith Mangal 41 Dec 14, 2022
A Fork of Gitlab's Permifrost tool for managing Snowflake Permissions

permifrost-fork This is a fork of the GitLab permifrost project. As the GitLab team is not currently maintaining the project, we've taken on maintenac

Hightouch 7 Oct 13, 2021
A fork of discord.py for anime enjoyers

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

Senpai Development 4 Nov 5, 2021
A fork of discord.py meant to replace it

Texus A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and

Texus 1 Nov 18, 2021
Who are we? We are the Hunters of all Torrent in this world.🗡️.Fork from SlamDevs

MIRROR HUNTER This Mirror Bot is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive. Repo la

Anime Republic 130 May 28, 2022