class Discord::Embed

Included Modules

Defined in:

discord/models.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.from_message(message : Notify::Message) : Embed #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(title : Nil | String = nil, url : Nil | String = nil, description : Nil | String = nil, color : Int32 | Nil = nil, author : Nil | Discord::Author = nil, footer : Nil | Discord::Footer = nil) #

[View source]

Class Method Detail

def self.color_from_hex(hex : String | Nil) : Int32 | Nil #

Slack で使う "#RRGGBB" 形式の色を Discord が要求する Int32 へ変換する。


[View source]

Instance Method Detail

def author : Author | Nil #

[View source]
def char_count : Int32 #

Discord の 6000 文字制限が対象とするフィールド(title / description / author.name / footer.text)の合計文字数。


[View source]
def color : Int32 | Nil #

[View source]
def description : String | Nil #

[View source]
def footer : Footer | Nil #

[View source]
def title : String | Nil #

[View source]
def url : String | Nil #

[View source]