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.
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()