class Cryscord::Command

Defined in:

command.cr

Constant Summary

CHAT_INPUT_REGEX = /^[-_\p{L}\p{N}\p{Devanagari}\p{Thai}]{1,32}$/

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : Nil | Cryscord::Snowflake, application_id : Nil | Cryscord::Snowflake, name : Nil | String, version : Nil | Cryscord::Snowflake, type : Cryscord::Command::Type = Type::CHAT_INPUT, guild_id : Cryscord::Snowflake = nil, name_localizations : Hash(String, String) = LocaleDict.new, description : Nil | String = "", description_localizations : Hash(String, String) = LocaleDict.new, options : Array(Cryscord::CommandOption) = Options.new, default_member_permissions : Cryscord::Permission = "", dm_permission : Bool = true, default_permission : Bool = nil, nsfw : Bool = false) #

[View source]

Instance Method Detail

def application_id : Snowflake #

def application_id=(application_id : Snowflake) #

[View source]
def application_id? : Snowflake | Nil #

def default_member_permissions=(default_member_permissions : Permission) #

[View source]
def default_member_permissions? : Permission #

[View source]
def default_permission=(default_permission : Bool) #

[View source]
def default_permission? : Bool #

[View source]
def description : String #

def description=(description : String) #

[View source]
def description? : String | Nil #

def description_localizations=(description_localizations : LocaleDict) #

[View source]
def description_localizations? : LocaleDict #

[View source]
def dm_permission=(dm_permission : Bool) #

[View source]
def dm_permission? : Bool #

[View source]
def guild_id=(guild_id : Snowflake) #

[View source]
def guild_id? : Snowflake #

[View source]
def id : Snowflake #

def id=(id : Snowflake) #

[View source]
def id? : Snowflake | Nil #

def name : String #

def name=(name : String) #

[View source]
def name? : String | Nil #

def name_localizations=(name_localizations : LocaleDict) #

[View source]
def name_localizations? : LocaleDict #

[View source]
def nsfw=(nsfw : Bool) #

[View source]
def nsfw? : Bool #

[View source]
def options=(options : Options) #

[View source]
def options? : Options #

[View source]
def type=(type : Command::Type) #

[View source]
def type? : Command::Type #

[View source]
def version : Snowflake #

def version=(version : Snowflake) #

[View source]
def version? : Snowflake | Nil #