memberConverter top-level constant Null safety

Converter<IMember> const memberConverter

A converter that converts input to an IMember.

This will first attempt to parse the input to a snowflake which will then be converted to an IMember. If this fails, the member will be looked up by name.

This converter has a Discord Slash Command Argument Type of CommandOptionType.user.


const Converter<IMember> memberConverter = FallbackConverter<IMember>(
    // Get member from mention or snowflake.
    CombineConverter<Snowflake, IMember>(snowflakeConverter, snowflakeToMember),
    // Get member by name or nickname
  type: CommandOptionType.user,