Skip to content

Collection

Beelzebub edited this page Oct 31, 2022 · 3 revisions

Properties

Name Type Description
list table with Emojis A list of added Emojis

lib.Collection(...)

Parameter Type Optional
emojis varargs Emojis

Constructs new Collection
This method only operates on data in memory.


Collection:Add(emojis)

Parameter Type Optional
emojis Emojis

Adds Emojis object to collection
This method only operates on data in memory.


Collection:Lookup(alias)

Parameter Type Optional
alias string

Lookups emoji from db, returns as Emoji instance. (looks for Emoji in all added Emojis)
This method only operates on data in memory.

":hmm:" > Emote("elite-pepe", "hmm")

Returns: Emoji


Collection:Search(query, isPattern, storage)

Parameter Type Optional
query string
isPattern boolean
storage table

Search emojis in db. (looks for Emoji in all added Emojis)
This method only operates on data in memory.

"coo" > {Emote("elite-gorgeous", "cool"), Emote("elite-memes", "cool_story_bob")}

Returns: table - Emoji list


Collection:Parse(text)

Parameter Type Optional
text string

Parse emotes from text (looks for Emoji in all added Emojis)
This method only operates on data in memory.

":wave: world! Im :very_dovolen:" > {Emoji("emoji", "1f44b"), "world! Im ", Emoji("elite-roflan", "very_dovolen")}

Returns: table - that contents text-parts & Emoji's