コード例 #1
0
        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);
        }