Converters API Reference#
Base#
- class lightbulb.converters.base.BaseConverter(context: context_.base.Context)[source]#
Base converter class.
- Parameters:
context (
Context
) – Context to convert the argument under.
- abstract async convert(arg: str) T [source]#
Conversion method for the converter.
- Parameters:
arg (
str
) – Argument to convert.- Returns:
Converted argument.
- Return type:
T
- context: context_.Context#
Context to convert the argument(s) under.
Special#
- class lightbulb.converters.special.BooleanConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a boolean.
- lightbulb.converters.special.ColorConverter#
Alias for
ColorConverter
.
- class lightbulb.converters.special.ColourConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a Colour object.
- class lightbulb.converters.special.EmojiConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into an Emoji object.
- class lightbulb.converters.special.GuildCategoryConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildCategory object.
- async convert(arg: str) GuildCategory [source]#
Conversion method for the converter.
- Parameters:
arg (
str
) – Argument to convert.- Returns:
Converted argument.
- Return type:
T
- class lightbulb.converters.special.GuildChannelConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildChannel object.
- async convert(arg: str) GuildChannel [source]#
Conversion method for the converter.
- Parameters:
arg (
str
) – Argument to convert.- Returns:
Converted argument.
- Return type:
T
- class lightbulb.converters.special.GuildConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildPreview object.
- async convert(arg: str) GuildPreview [source]#
Conversion method for the converter.
- Parameters:
arg (
str
) – Argument to convert.- Returns:
Converted argument.
- Return type:
T
- class lightbulb.converters.special.GuildVoiceChannelConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildVoiceChannel object.
- async convert(arg: str) GuildVoiceChannel [source]#
Conversion method for the converter.
- Parameters:
arg (
str
) – Argument to convert.- Returns:
Converted argument.
- Return type:
T
- class lightbulb.converters.special.InviteConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into an Invite object.
- class lightbulb.converters.special.MemberConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a Member object.
- class lightbulb.converters.special.MessageConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a Message object.
- class lightbulb.converters.special.RoleConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a Role object.
- class lightbulb.converters.special.SnowflakeConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a Snowflake object.
- class lightbulb.converters.special.TextableGuildChannelConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a TextableGuildChannel object.
- async convert(arg: str) TextableGuildChannel [source]#
Conversion method for the converter.
- Parameters:
arg (
str
) – Argument to convert.- Returns:
Converted argument.
- Return type:
T
- class lightbulb.converters.special.TimestampConverter(context: context_.base.Context)[source]#
Implementation of the base converter for converting arguments into a datetime object.