struct Cryscord::CommandOption

Defined in:

command_option.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(type : CommandOption::Type, name : String, description : String, name_localizations : Hash(String, String) = LocaleDict.new, description_localizations : Hash(String, String) = LocaleDict.new, required : Bool = false, choices : Array(Cryscord::CommandOptionChoice) = ChoiceArray.new, options : Array(Cryscord::CommandOption) = ParentCommandOptionArray.new, channel_types : Array(Cryscord::Channel::Type) = ChannelTypeArray.new, min_value : UInt64 | Nil = nil, max_value : UInt64 | Nil = nil, min_length : UInt32 | Nil = nil, max_length : UInt32 | Nil = nil, autocomplete : Bool = false) #

[View source]

Instance Method Detail

def autocomplete : Bool #

def channel_types : Array(Cryscord::Channel::Type) #

def choices : Array(Cryscord::CommandOptionChoice) #

def clone #

[View source]
def copy_with(type _type = @type, name _name = @name, description _description = @description, name_localizations _name_localizations = @name_localizations, description_localizations _description_localizations = @description_localizations, required _required = @required, choices _choices = @choices, options _options = @options, channel_types _channel_types = @channel_types, min_value _min_value = @min_value, max_value _max_value = @max_value, min_length _min_length = @min_length, max_length _max_length = @max_length, autocomplete _autocomplete = @autocomplete) #

[View source]
def description : String #

def description_localizations : Hash(String, String) #

def max_length : UInt32 | Nil #

def max_value : UInt64 | Nil #

def min_length : UInt32 | Nil #

def min_value : UInt64 | Nil #

def name : String #

def name_localizations : Hash(String, String) #

def options : Array(Cryscord::CommandOption) #

def required : Bool #

def type : CommandOption::Type #