A very strange method of declaring commands with hikari-lightbulb
Project description
Lightbulb WTF
This is a joke project (but working somehow).
I just wanted to mess around to see how much I could mess with lightbulb command declaration syntax.
Usage
Commands are declared like generics using square brackets ([]
) as the construction method.
A basic command:
import lightbulb
from lightbulb.ext.wtf import *
bot = lightbulb.BotApp(...)
async def foo_callback(ctx):
await ctx.respond("Bar")
cmd = Command[
Implements[lightbulb.PrefixCommand],
Name["foo"],
Description["test command"],
Executes[foo_callback]
]
bot.command(cmd)
bot.run()
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 lightbulb-ext-wtf-0.1.0.tar.gz
.
File metadata
- Download URL: lightbulb-ext-wtf-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9adcaee82b028a7f2e71ad8d5cbe8753515c0a15ffb23875e01919fa03ec23bc |
|
MD5 | c8dd6d19c7915b5f4724d58a31cd6eea |
|
BLAKE2b-256 | cbb0a459f248feb81675a2bc47f906aa61f931289eb2505c8d3cecb8bc6170a8 |
File details
Details for the file lightbulb_ext_wtf-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: lightbulb_ext_wtf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd0aff3d4ff4cb8ac4ca04b0ff45d21b5a954ac984b8416351ac6ef212b2f0aa |
|
MD5 | ffdd16046dc235dbad6f5ffaa9c6d354 |
|
BLAKE2b-256 | 79fc78be30359a4fc42922204ca747c0834679f3740570098ed07f66db579cd4 |