API Reference

Compound Objects

wtf.commands.Command = <wtf.commands._Command object>

A complex structure representing a lightbulb CommandLike object. Similar to lightbulb.decorators.command.

Required Parameters:
Optional Parameters:

Example

cmd = Command[
    Implements[lightbulb.PrefixCommand],
    Name["foo"],
    Description["test command"],
    Executes[lambda ctx: ctx.respond("bar")]
]
wtf.options.Choice = <wtf.options._Choice object>

A choice for the option.

wtf.options.Option = <wtf.options._Option object>

A command option.


Multiple Param Objects

wtf.commands.Aliases = <wtf.commands._Aliases object>

The aliases for the name of the enclosing command. See lightbulb.commands.base.CommandLike.aliases.

Required Parameters:
  • *str one or more aliases for the enclosing command.

Example

aliases = Aliases["foo", "bar", "baz"]
wtf.commands.Checks = <wtf.commands._Checks object>

The check object(s) to apply to the enclosing command. Similar to lightbulb’s lightbulb.decorators.add_checks decorator.

Required Parameters:

Example

checks = Checks[lightbulb.guild_only, lightbulb.owner_only]
wtf.commands.Guilds = <wtf.commands._Guilds object>

The guilds that the enclosing command will be created in. See lightbulb.commands.base.CommandLike.guilds.

Required Parameters:
  • *int one or more guild IDs for the enclosing command to be created in.

Example

guilds = Guilds[1234, 5678]
wtf.commands.Implements = <wtf.commands._Implements object>

The command type(s) the enclosing command implements. Similar to lightbulb’s lightbulb.decorators.implements decorator.

Required Parameters:

Example

impl = Implements[lightbulb.SlashCommand, lightbulb.PrefixCommand]
wtf.commands.Subcommands = <wtf.commands._Subcommands object>

A container for the enclosing command’s subcommands.

Required Parameters:
  • *Command one or more commands to register to the enclosing command as subcommands.

Example

subcommands = Subcommands[Command[...], Command[...]]
wtf.options.Choices = <wtf.options._Choices object>

Container for all the option choices.

wtf.options.Options = <wtf.options._Options object>

Container for all the command options.


Single Param Objects

wtf.basic.Description = <wtf.basic._Description object>

The description attribute for an object.

Required Parameters:
  • str value of the object’s description.

Example

description = Description["some description"]
wtf.basic.Name = <wtf.basic._Name object>

The name attribute for an object.

Required Parameters:
  • str value of the object’s name.

Example

name = Name["some_name"]
wtf.commands.AutoDefer = <wtf.commands._AutoDefer object>

Whether or not the enclosing command’s response will be automatically deferred upon invocation. See lightbulb.commands.base.CommandLike.auto_defer.

Required Parameters:
  • bool whether or not to automatically defer the response of the enclosing command.

Example

defer = AutoDefer[True]
wtf.commands.CheckExempt = <wtf.commands._CheckExempt object>

The check exempt predicate to use for the enclosing command. Similar to lightbulb.decorators.check_exempt.

Required Parameters:
  • Syncronous or asyncronous function to use as the enclosing command’s check exempt predicate.

Example

exempt = CheckExempt[lambda ctx: ctx.author.id == 12345]
wtf.commands.CooldownManager = <wtf.commands._CooldownManager object>

The cooldown manager instance to use for the enclosing command. See lightbulb.commands.base.CommandLike.cooldown_manager.

Required Parameters:

Example

manager = CooldownManager[lightbulb.CooldownManager(lambda _: lightbulb.UserBucket(10, 1))]
wtf.commands.Ephemeral = <wtf.commands._Ephemeral object>

Whether or not the enclosing command’s responses will be ephemeral by default. See lightbulb.commands.base.CommandLike.ephemeral.

Required Parameters:
  • bool whether or not to send command responses as ephemeral by default.

Example

ephemeral = Ephemeral[True]
wtf.commands.ErrorHandler = <wtf.commands._ErrorHandler object>

The error handler function to use for the enclosing command. Similar to lightbulb’s lightbulb.commands.base.CommandLike.set_error_handler decorator.

Required Parameters:
  • Asyncronous function to use as the error handler for the enclosing command.

Example

async def _handler(event: lightbulb.CommandErrorEvent):
    ...

handler = ErrorHandler[_handler]
wtf.commands.HelpGetter = <wtf.commands._HelpGetter object>

The long help text getter function for the enclosing command. See lightbulb.commands.base.CommandLike.help_getter.

Required Parameters:
  • Syncronous function returning the long help text for the enclosing command.

Example

getter = HelpGetter[lambda _: "foobar"]
wtf.commands.Hidden = <wtf.commands._Hidden object>

Whether or not the enclosing command should be hidden from the default help command. See lightbulb.commands.base.CommandLike.hidden.

Required Parameters:
  • bool whether or not to hide the enclosing command from the default help command.

Example

hidden = Hidden[True]
wtf.commands.InheritChecks = <wtf.commands._InheritChecks object>

Whether or not the enclosing command should inherit checks from the parent command group. See lightbulb.commands.base.CommandLike.inherit_checks.

Required Parameters:

bool whether or not the enclosing command will inherit the parent’s checks.

Example

inherit = InheritChecks[True]
wtf.commands.Parser = <wtf.commands._Parser object>

The parser class to use for the enclosing command. See lightbulb.commands.base.CommandLike.parser.

Required Parameters:
  • Type[:obj:`lightbulb.utils.parser.BaseParser] parser class for the enclosing command.

Example

parser = Parser[lightbulb.utils.Parser]
wtf.executable.Executes = <wtf.executable._Executes object>

The syncronous or asyncronous function to execute when the enclosing command is invoked. See lightbulb.commands.base.CommandLike.callback.

Required Parameters:
  • Syncronous or asyncronous function to use as the callback for the enclosing command.

Example

wtf.options.Default = <wtf.options._Default object>

The default value for the option.

wtf.options.Modifier = <wtf.options._Modifier object>

The parsing modifier for the option.

wtf.options.Required = <wtf.options._Required object>

Whether or not the option is required. Inferred from the default value if not provided.

wtf.options.Type = <wtf.options._Type object>

The type of the command option.

wtf.options.Value = <wtf.options._Value object>

The value for the option choice.