All Projects → Gorialis → Jishaku

Gorialis / Jishaku

Licence: mit
A debugging and testing cog for discord.py rewrite bots.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Jishaku

Discord.js Menu
💬 Easily create Discord.js v12 embed menus with reactions and unlimited customizable pages.
Stars: ✭ 89 (-54.12%)
Mutual labels:  discord-api
Arikawa
A Golang library and framework for the Discord API.
Stars: ✭ 123 (-36.6%)
Mutual labels:  discord-api
Lenoxbot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 163 (-15.98%)
Mutual labels:  discord-api
Music Bot
Simple music bot with a full-blown queue system that is easy to understand
Stars: ✭ 102 (-47.42%)
Mutual labels:  discord-api
Discordpp
A Modularized C++ Library for the Discord API
Stars: ✭ 111 (-42.78%)
Mutual labels:  discord-api
Discord Haskell
Haskell library for writing Discord bots
Stars: ✭ 129 (-33.51%)
Mutual labels:  discord-api
Client
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
Stars: ✭ 84 (-56.7%)
Mutual labels:  discord-api
Discord Py Slash Command
A simple discord slash command handler for discord.py.
Stars: ✭ 183 (-5.67%)
Mutual labels:  discord-api
Discord Panel
📊 User friendly dashboard/tool for discord bot developpers to manage servers
Stars: ✭ 116 (-40.21%)
Mutual labels:  discord-api
Discordgo
(Golang) Go bindings for Discord
Stars: ✭ 2,582 (+1230.93%)
Mutual labels:  discord-api
Swiftdiscord
Discord API Client for Swift
Stars: ✭ 103 (-46.91%)
Mutual labels:  discord-api
Discljord
A Clojure wrapper library for the Discord API, with full API coverage (except voice, for now), and high scalability
Stars: ✭ 111 (-42.78%)
Mutual labels:  discord-api
Discordcr
Minimalist Discord library for Crystal. (Still WIP, but usable)
Stars: ✭ 137 (-29.38%)
Mutual labels:  discord-api
Discord Rich Presence Tool
A C++/Qt program that lets you fill in your own custom Discord Rich Presence information for games and activities away from the PC.
Stars: ✭ 91 (-53.09%)
Mutual labels:  discord-api
Sword
Discord library for Swift
Stars: ✭ 166 (-14.43%)
Mutual labels:  discord-api
Swag Bot
My first ever discord bot using discord.js. The bot has a total of 77 commands, and it is capable of manipulating texts and images, analyzing data, searching information, and playing music. It has high level features like xp system, coins database, and spam detector.
Stars: ✭ 86 (-55.67%)
Mutual labels:  discord-api
Discord.js
discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.
Stars: ✭ 16,432 (+8370.1%)
Mutual labels:  discord-api
Selfbot.py
selfbot.py - A python discord selfbot thats easy to install - Written using discord.py
Stars: ✭ 191 (-1.55%)
Mutual labels:  discord-api
Discordrpcmaker
Cross-platform Discord Rich Presence Maker, WITH BUTTONS!
Stars: ✭ 165 (-14.95%)
Mutual labels:  discord-api
Discord.net
An unofficial .Net wrapper for the Discord API (http://discordapp.com)
Stars: ✭ 2,253 (+1061.34%)
Mutual labels:  discord-api

Python versions License Status Travis CI Circle CI AppVeyor CI Issues Commit activity


  jishaku

a debugging and utility extension for discord.py bots
Read the documentation online.


jishaku is an extension for bot developers that enables rapid prototyping, experimentation, and debugging of features for bots.

One of jishaku's core philosophies is to be dynamic and easy-to-use. Here's the two step install:

  1. Download jishaku on the command line using pip:
pip install -U jishaku
  1. Load the extension in your bot code before it runs:
bot.load_extension('jishaku')

That's it!

You can also import the module to use the command development utilities.

Index

Command reference

> jishaku [py|python] <argument>

> jishaku [pyi|python_inspect] <argument>

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

> jsk py 3+4

Beep Bot

7

It also supports async expressions:

> jsk py await _ctx.pins()

Beep Bot

[<Message id=123456789012345678 ...>, ...]

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 discord.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 JISHAKU_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 jishaku retain on to change this behavior and retain variables, and jishaku retain off if you change your mind later.

> jishaku [dis|disassemble] <argument>

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.

> jishaku [sh|shell] <argument>

The shell command executes commands within your system shell.

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

> jishaku git <argument>

> jishaku pip <argument>

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

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

> jishaku unload [extensions...]

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

You can reload jishaku itself with jsk reload jishaku.
jsk reload ~ will reload all extensions on your bot.

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

> jishaku shutdown

This command gracefully shuts down your bot.

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

> jishaku cat <file>

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.

> jishaku curl <url>

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

> jishaku sudo <command string>

> jishaku su <member> <command string>

> jishaku in <channel> <command string>

> jishaku debug <command string>

> jishaku repeat <times> <command string>

These commands serve as command control for other commands.

jishaku sudo bypasses all checks and cooldowns on a given command.

jishaku su allows you to execute a command as another user.

jishaku in allows you to execute a command in another channel.

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

jishaku repeat repeats a command a number of times.

Installing development versions

If you'd like to test the latest versions of jishaku, you can do so by downloading from the git hosts instead of from PyPI.

From GitHub:

pip install -U "jishaku @ git+https://github.com/Gorialis/[email protected]"

From GitLab:

pip install -U "jishaku @ git+https://gitlab.com/Gorialis/[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 jishaku 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 jishaku to be reinstalled like this:

From GitHub:

pip install -U --no-deps --force-reinstall "jishaku @ git+https://github.com/Gorialis/[email protected]"

From GitLab:

pip install -U --no-deps --force-reinstall "jishaku @ git+https://gitlab.com/Gorialis/[email protected]"

You must have installed jishaku 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].