emoji

package
v4.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2024 License: BSD-2-Clause, BSD-2-Clause Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// InvalidReaction is returned if the passed reaction string is invalid.
	InvalidReaction = errors.New(
		"The reaction is not valid, it must be a single emoji")
)

Functions

func ValidateReaction

func ValidateReaction(reaction string) error

ValidateReaction checks that the reaction only contains a single emoji. Returns InvalidReaction if the emoji is invalid.

Types

type Emoji added in v4.6.3

type Emoji struct {
	Character string `json:"character"` // Actual Unicode character
	Name      string `json:"name"`      // CLDR short name
	Comment   string `json:"comment"`   // Data file comments; usually version
	CodePoint string `json:"codePoint"` // Code point(s) for character
	Group     string `json:"group"`
	Subgroup  string `json:"subgroup"`
}

Emoji represents comprehensive information of each Unicode emoji character.

func SupportedEmojis added in v4.5.0

func SupportedEmojis() []Emoji

SupportedEmojis returns a list of emojis that are supported by the backend. The list includes all emojis described in UTS #51 section A.1: Data Files.

type File added in v4.6.3

type File struct {
	// Date is the date on the document
	Date string `json:"date"`

	// DateAccessed is the timestamp the file was downloaded
	DateAccessed string `json:"dateAccessed"`

	// Version is the version of Emoji described.
	Version string `json:"version"`

	// Map of all emoji character.
	Map Map `json:"map"`
}

File represents the contents of an emoji file downloaded from Unicode.

type Map added in v4.6.3

type Map map[string]Emoji

Map lists all emojis keyed on their character string.

func SupportedEmojisMap added in v4.6.3

func SupportedEmojisMap() Map

SupportedEmojisMap returns a map of emojis that are supported by the backend as described by SupportedEmojis.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL