Converters API Reference#
Base#
- class lightbulb.converters.base.BaseConverter(context: lightbulb.context.base.Context)[source]#
Base converter class
- Parameters
context (
Context
) – Context to convert the argument under.
- abstract async convert(arg: str) lightbulb.converters.base.T [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- context#
Context to convert the argument(s) under.
Special#
- class lightbulb.converters.special.BooleanConverter(context: lightbulb.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: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a Colour object.
- async convert(arg: str) hikari.colors.Color [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.EmojiConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into an Emoji object.
- async convert(arg: str) hikari.emojis.Emoji [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.GuildCategoryConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildCategory object.
- async convert(arg: str) hikari.channels.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: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildChannel object.
- async convert(arg: str) hikari.channels.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: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildPreview object.
- async convert(arg: str) hikari.guilds.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: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a GuildVoiceChannel object.
- async convert(arg: str) hikari.channels.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: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into an Invite object.
- async convert(arg: str) hikari.invites.Invite [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.MemberConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a Member object.
- async convert(arg: str) hikari.guilds.Member [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.MessageConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a Message object.
- async convert(arg: str) hikari.messages.Message [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.RoleConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a Role object.
- async convert(arg: str) hikari.guilds.Role [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.SnowflakeConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a Snowflake object.
- async convert(arg: str) hikari.snowflakes.Snowflake [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.TextableGuildChannelConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a TextableGuildChannel object.
- async convert(arg: str) hikari.channels.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: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a datetime object.
- async convert(arg: str) datetime.datetime [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T
- class lightbulb.converters.special.UserConverter(context: lightbulb.context.base.Context)[source]#
Implementation of the base converter for converting arguments into a User object.
- async convert(arg: str) hikari.users.User [source]#
Conversion method for the converter.
- Parameters
arg (
str
) – Argument to convert.- Returns
Converted argument.
- Return type
T