Skip to main content

🌕 A dead simple command handler for Hikari

Project description

hikari-crescent

code-style-black Mypy Docs pre-commit.ci status Pypi

A simple command handler for Hikari.

Features

  • Simple and intuitive API.
  • Slash, user, and message commands.
  • Error handling.

Links

📝 | Docs
📦 | Pypi

Installation

Crescent is supported in python3.8+.

pip install hikari-crescent

Usage

Crescent uses signature parsing to generate your commands. Creating commands is as easy as adding typehints!

import crescent

bot = crescent.Bot("YOUR_TOKEN")

# Include the command in your bot - don't forget this
@bot.include
# Create a slash command
@crescent.command
async def say(ctx: crescent.Context, word: str):
    await ctx.respond(word)

bot.run()

Information for arguments can be provided using the Annotated type hint. See this example for more information.

# python 3.9 +
from typing import Annotated as Atd

# python 3.8
from typing_extensions import Annotated as Atd

@bot.include
@crescent.command
async def say(ctx: crescent.Context, word: Atd[str, "The word to say"]):
    await ctx.respond(word)

Support

Contact Lunarmagpie❤#0001 on Discord or create an issue. All questions are welcome!

Contributing

Create a issue for your feature. There aren't any guildlines right now so just don't be rude.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hikari-crescent-0.1.0b10.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hikari_crescent-0.1.0b10-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file hikari-crescent-0.1.0b10.tar.gz.

File metadata

  • Download URL: hikari-crescent-0.1.0b10.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.13.0-1023-azure

File hashes

Hashes for hikari-crescent-0.1.0b10.tar.gz
Algorithm Hash digest
SHA256 b6977d8751e26aa992396c4880e9d901c9fd2fe5b2298409030cf7547ac2f249
MD5 a2e0bac8a71b472122e68c19026d3a74
BLAKE2b-256 070c141249bd548203b3fd9ad6b8b24861cecfa75cbbdb3f6d4ef98256f6eb38

See more details on using hashes here.

File details

Details for the file hikari_crescent-0.1.0b10-py3-none-any.whl.

File metadata

  • Download URL: hikari_crescent-0.1.0b10-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.13.0-1023-azure

File hashes

Hashes for hikari_crescent-0.1.0b10-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8d6f722741f278e7576b008b9a208ed5d45522d312291c33fcd5fcf18c6626
MD5 6c6265feda1d7c23cd067631e0bae982
BLAKE2b-256 d1e7c3b1f069dd84422e12e9c29ce2982df6b933952219fd0ba9de6a684ef7f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page