public static TResponse AddChoice <TResponse>(this TResponse @this, LocalSlashCommandOptionChoice choice) where TResponse : LocalInteractionAutoCompleteResponse { Guard.IsNotNull(choice); if ([email protected](choice, out var list)) { @this.Choices = new(list); } return(@this); }
protected LocalSlashCommandOptionChoice(LocalSlashCommandOptionChoice other) { Name = other.Name; Value = other.Name; }
public static TSlashCommandOption AddChoice <TSlashCommandOption>(this TSlashCommandOption @this, LocalSlashCommandOptionChoice choice) where TSlashCommandOption : LocalSlashCommandOption { Guard.IsNotNull(choice); if ([email protected](choice, out var list)) { @this.Choices = new(list); } return(@this); }