A command handler for hikari with a focus on type-safety and correctness.
Project description
A command handler for hikari with a focus on type-safety and correctness.
Installation
To install arc, run the following command:
pip install -U hikari-arc
To check if arc has successfully installed or not, run the following:
python3 -m arc
# On Windows you may need to run:
py -m arc
[!NOTE]
hikari-arc
requires a Python version of at least 3.10.
If you're just getting started, you may also use the template repository to get started with.
Basic Usage
import hikari
import arc
bot = hikari.GatewayBot("TOKEN") # or hikari.RESTBot
client = arc.GatewayClient(bot) # or arc.RESTClient
@client.include
@arc.slash_command("hi", "Say hi!")
async def ping(
ctx: arc.GatewayContext,
user: arc.Option[hikari.User, arc.UserParams("The user to say hi to.")]
) -> None:
await ctx.respond(f"Hey {user.mention}!")
bot.run()
To get started with arc
, see the documentation, or the examples.
Issues and support
For general usage help or questions, see the hikari discord, if you have found a bug or have a feature request, feel free to open an issue!
Contributing
See Contributing.
Acknowledgements
arc
is in large part a combination of all the parts I like in other command handlers, with my own spin on it. The following projects have inspired me and aided me greatly in the design of this library:
hikari-lightbulb
- The library initially started as a reimagination of lightbulb, it inherits a similar project structure and terminology.Tanjun
- For the idea of usingtyping.Annotated
and dependency injection in a command handler.arc
also uses the same dependency injection library,Alluka
, under the hood.hikari-crescent
The design of hooks is largely inspired bycrescent
.FastAPI
- Some design ideas and most of the documentation configuration derives fromFastAPI
.- The
arc
logo was made by @PythonTryHard.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hikari_arc-1.4.0.tar.gz
.
File metadata
- Download URL: hikari_arc-1.4.0.tar.gz
- Upload date:
- Size: 82.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9acb2922e62afb7592bd1e83f1d8045a70b90d36d3d8e51b51373051aceea61 |
|
MD5 | 2d875815e69666e962eb31915eddeb39 |
|
BLAKE2b-256 | a81682f4b16d18ec9193ea7e3d2566dfe18709c6194281b8ecc9a212419623c1 |
File details
Details for the file hikari_arc-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: hikari_arc-1.4.0-py3-none-any.whl
- Upload date:
- Size: 125.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75cdf4bb78010306264d548588489a1cfb32db4f29a90fb1e1abcfb7ed358748 |
|
MD5 | c68f96a4fab8d5cae278fb4691f370d5 |
|
BLAKE2b-256 | bf93766f22273c18542149064a19c82aef3856dc3c4a3f6bbefd72979bc0bbf9 |