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);
        }
Пример #2
0
 protected LocalSlashCommandOptionChoice(LocalSlashCommandOptionChoice other)
 {
     Name  = other.Name;
     Value = other.Name;
 }
Пример #3
0
        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);
        }